[Zodb-checkins] CVS: ZODB3/zdaemon - Daemon.py:1.15
Jeremy Hylton
jeremy@zope.com
Tue, 29 Oct 2002 12:44:58 -0500
Update of /cvs-repository/ZODB3/zdaemon
In directory cvs.zope.org:/tmp/cvs-serv772/zdaemon
Modified Files:
Daemon.py
Log Message:
Improved logging.
Always log the exit status of the client, even if it was exit status
0. Also log a message when zdaemon is exiting. Without these
changes, there's nothing in the log to indicate that a managed process
exited normally and convinced zdaemon to exit, too.
Bug fix candidate.
=== ZODB3/zdaemon/Daemon.py 1.14 => 1.15 ===
--- ZODB3/zdaemon/Daemon.py:1.14 Fri Oct 11 09:29:55 2002
+++ ZODB3/zdaemon/Daemon.py Tue Oct 29 12:44:58 2002
@@ -57,14 +57,15 @@
signal.signal(sig, SignalPasser(pid))
pstamp('Started subprocess: pid %s' % pid, zLOG.INFO)
write_pidfile(pidfile)
- p,s = wait(pid) # waitpid will block until child exit
+ p, s = wait(pid) # waitpid will block until child exit
+ log_pid(p, s)
if s:
# continue and restart because our child died
# with a nonzero exit code, meaning he bit it in
# an unsavory way (likely a segfault or something)
- log_pid(p, s)
continue
else:
+ pstamp("zdaemon exiting")
# no need to restart, our child wanted to die.
raise DieNow