Ticket #6443: procmontest.tac

File procmontest.tac, 367 bytes (added by Jean-Paul Calderone, 6 years ago)

sudo PYTHONPATH=... twistd --euid --uid nobody --gid nogroup -ny procmontest.tac

Line 
1from twisted.application.service import Application
2
3from twisted.runner.procmon import ProcessMonitor
4
5application = Application("procmontest")
6monitor = ProcessMonitor()
7monitor.setServiceParent(application)
8
9monitor.addProcess(
10        "kittens",
11        ["/usr/bin/python", "-c",
12        "import os; print os.getuid(), os.geteuid()"],
13        uid=1000, gid=1000)