Ticket #986: nodaemon.patch

File nodaemon.patch, 825 bytes (added by np, at 2011-11-10T15:31:52Z)
  • src/allmydata/scripts/startstop_node.py

     
    1010    optFlags = [
    1111        ["profile", "p", "Run under the Python profiler, putting results in 'profiling_results.prof'."],
    1212        ["syslog", None, "Tell the node to log to syslog, not a file."],
     13        ["nodaemon", "n", "Do not daemonize."],
    1314        ]
    1415
    1516    def getSynopsis(self):
     
    7071        args.extend(["--logfile", os.path.join("logs", "twistd.log")])
    7172    if opts["profile"]:
    7273        args.extend(["--profile=profiling_results.prof", "--savestats",])
     74    if opts["nodaemon"]:
     75        args.extend(["--nodaemon", "--umask=0077"])
    7376    # now we're committed
    7477    os.chdir(basedir)
    7578    from twisted.scripts import twistd