1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
--- src/allmydata/scripts/startstop_node.py 2011-10-30 22:54:34.000000000 +0100
+++ src/allmydata/scripts/startstop_node.py 2011-11-10 15:22:21.432711365 +0100
@@ -10,6 +10,7 @@
optFlags = [
["profile", "p", "Run under the Python profiler, putting results in 'profiling_results.prof'."],
["syslog", None, "Tell the node to log to syslog, not a file."],
+ ["nodaemon", "n", "Do not daemonize."],
]
def getSynopsis(self):
@@ -70,6 +71,8 @@
args.extend(["--logfile", os.path.join("logs", "twistd.log")])
if opts["profile"]:
args.extend(["--profile=profiling_results.prof", "--savestats",])
+ if opts["nodaemon"]:
+ args.extend(["--nodaemon", "--umask=0077"])
# now we're committed
os.chdir(basedir)
from twisted.scripts import twistd
|