Commit 6502841d authored by Jason Madden's avatar Jason Madden

Don't try to run SIGCHLD test on win32

parent 2cd690c5
...@@ -19,18 +19,21 @@ def handle_sigchld(*args): ...@@ -19,18 +19,21 @@ def handle_sigchld(*args):
raise TypeError("This should be ignored but printed") raise TypeError("This should be ignored but printed")
import signal import signal
assert signal.getsignal(signal.SIGCHLD) == signal.SIG_DFL if hasattr(signal, 'SIGCHLD'):
signal.signal(signal.SIGCHLD, handle_sigchld) assert signal.getsignal(signal.SIGCHLD) == signal.SIG_DFL
handler = signal.getsignal(signal.SIGCHLD) signal.signal(signal.SIGCHLD, handle_sigchld)
assert signal.getsignal(signal.SIGCHLD) is handle_sigchld, handler handler = signal.getsignal(signal.SIGCHLD)
assert signal.getsignal(signal.SIGCHLD) is handle_sigchld, handler
pid = os.fork() pid = os.fork()
if not pid: if not pid:
# child # child
gevent.sleep(0.2) gevent.sleep(0.2)
sys.exit(0)
else:
with gevent.Timeout(1):
while awaiting_child:
gevent.sleep(0.01)
sys.exit(0) sys.exit(0)
else:
with gevent.Timeout(1):
while awaiting_child:
gevent.sleep(0.01)
sys.exit(0)
else:
print("No SIGCHLD, not testing")
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