Log message for revision 40547: Collector #1904: On Mac OS X avoid a spurious OSError when zopectl exits.
Changed: U Zope/branches/2.9/doc/CHANGES.txt U Zope/branches/2.9/lib/python/Zope2/Startup/zopectl.py -=- Modified: Zope/branches/2.9/doc/CHANGES.txt =================================================================== --- Zope/branches/2.9/doc/CHANGES.txt 2005-12-05 16:34:38 UTC (rev 40546) +++ Zope/branches/2.9/doc/CHANGES.txt 2005-12-05 16:50:14 UTC (rev 40547) @@ -104,3 +104,6 @@ - Switched to the new improved test runner from Zope 3. Run test.py with -h to find out more. + + - Collector #1904: On Mac OS X avoid a spurious OSError when + zopectl exits. Modified: Zope/branches/2.9/lib/python/Zope2/Startup/zopectl.py =================================================================== --- Zope/branches/2.9/lib/python/Zope2/Startup/zopectl.py 2005-12-05 16:34:38 UTC (rev 40546) +++ Zope/branches/2.9/lib/python/Zope2/Startup/zopectl.py 2005-12-05 16:50:14 UTC (rev 40547) @@ -304,5 +304,13 @@ # If it is not reset, 'os.wait[pid]' can non-deterministically fail. # Thus, use a way such that "SIGCHLD" is definitely reset in children. #signal.signal(signal.SIGCHLD, signal.SIG_IGN) - signal.signal(signal.SIGCHLD, _ignoreSIGCHLD) + if os.uname()[0] != 'Darwin': + # On Mac OS X, setting up a signal handler causes waitpid to + # raise EINTR, which is not preventable via the Python signal + # handler API and can't be dealt with properly as we can't pass + # the SA_RESTART to the signal API. Since Mac OS X doesn't + # appear to clutter up the process table with zombies if + # SIGCHILD is unset, just don't bother registering a SIGCHILD + # signal handler at all. + signal.signal(signal.SIGCHLD, _ignoreSIGCHLD) main() _______________________________________________ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins