Commit c1c380a8 authored by Florent Guillaume's avatar Florent Guillaume

Collector #1904: On Mac OS X avoid a spurious OSError when zopectl

exits.
parent f1b1f06c
...@@ -104,3 +104,6 @@ Zope Changes ...@@ -104,3 +104,6 @@ Zope Changes
- Switched to the new improved test runner from Zope 3. Run - Switched to the new improved test runner from Zope 3. Run
test.py with -h to find out more. test.py with -h to find out more.
- Collector #1904: On Mac OS X avoid a spurious OSError when
zopectl exits.
...@@ -304,5 +304,13 @@ if __name__ == "__main__": ...@@ -304,5 +304,13 @@ if __name__ == "__main__":
# If it is not reset, 'os.wait[pid]' can non-deterministically fail. # If it is not reset, 'os.wait[pid]' can non-deterministically fail.
# Thus, use a way such that "SIGCHLD" is definitely reset in children. # Thus, use a way such that "SIGCHLD" is definitely reset in children.
#signal.signal(signal.SIGCHLD, signal.SIG_IGN) #signal.signal(signal.SIGCHLD, signal.SIG_IGN)
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) signal.signal(signal.SIGCHLD, _ignoreSIGCHLD)
main() 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