Commit e3470632 authored by Chris McDonough's avatar Chris McDonough

Default to zdrun daemon status "on" (effectively prevents signals from...

Default to zdrun daemon status "on" (effectively prevents signals from reaching child processes).  This will prevent the symptom of killing the server when pressing ctrl-C from an interactive logtail.

Also ignore child process return statuses.  If we don't, an interactive zopectl shell can clutter up the process table with zombies after a few starts and stops.
parent 055ab4e0
......@@ -35,6 +35,7 @@ action "help" to find out about available actions.
import os
import sys
import signal
import zdaemon
import Zope.Startup
......@@ -66,7 +67,7 @@ class ZopeCtlOptions(ZDOptions):
ZDOptions.__init__(self)
self.add("backofflimit", "runner.backoff_limit",
"b:", "backoff-limit=", int, default=10)
self.add("daemon", "runner.daemon", "d", "daemon", flag=1, default=0)
self.add("daemon", "runner.daemon", "d", "daemon", flag=1, default=1)
self.add("forever", "runner.forever", "f", "forever",
flag=1, default=0)
self.add("hang_around", "runner.hang_around", default=0)
......@@ -179,6 +180,9 @@ def main(args=None):
c.do_status()
c.cmdloop()
if __name__ == "__main__":
# we don't care to be notified of our childrens' exit statuses.
# this prevents zombie processes from cluttering up the process
# table when zopectl start/stop is used interactively.
signal.signal(signal.SIGCHLD, signal.SIG_IGN)
main()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment