[Zodb-checkins] CVS: StandaloneZODB/zdaemon - Daemon.py:1.6

Jeremy Hylton jeremy@zope.com
Tue, 23 Apr 2002 00:21:34 -0400


Update of /cvs-repository/StandaloneZODB/zdaemon
In directory cvs.zope.org:/tmp/cvs-serv21135/zdaemon

Modified Files:
	Daemon.py 
Log Message:
Add zdaemon.tests to the list of install packages in setup().

In zdaemon, print the wait status if it is different than the signal
that caused the process to be terminated.  This message will often
signal that a core file has been produced.  We don't say that directly
because there's no standard test for it.  The wait status is the next
best thing, I think, and it's what zdaemon printed until the previous
checkin.


=== StandaloneZODB/zdaemon/Daemon.py 1.5 => 1.6 ===
                             msg = "terminated by signal %s(%s)" % (signame,
                                                                   signum)
+                            # We'd like to report whether a core file
+                            # was produced, but there isn't a standard
+                            # way to check.  It seems that some
+                            # (many?) Unixes use bit 0x80 in the wait
+                            # status, but how to tell?  A simple
+                            # alternative is to assume that no core
+                            # file was produced if the wait status is
+                            # exactly equal to the signal.  Otherwise,
+                            # there might be a core file and it's
+                            # useful to print the wait status.
+                            if signum != s:
+                                msg += ", wait status: %s" % signum
                         else:
                             # XXX what should we do here?
                             signum = os.WSTOPSIG(s)