Use the correct waitpid

This commit is contained in:
donovan
2008-06-11 13:17:56 -07:00
parent 27980fcc2b
commit 96f02a61a7

View File

@@ -30,6 +30,7 @@ import sys
from eventlet import coros from eventlet import coros
from eventlet import pools from eventlet import pools
from eventlet import greenio from eventlet import greenio
from eventlet import util
class DeadProcess(RuntimeError): class DeadProcess(RuntimeError):
@@ -44,7 +45,7 @@ CHILD_EVENTS = {}
def sig_child(signal, frame): def sig_child(signal, frame):
for child_pid in CHILD_PIDS: for child_pid in CHILD_PIDS:
try: try:
pid, code = os.waitpid(child_pid, os.WNOHANG) pid, code = util.__original_waitpid__(child_pid, os.WNOHANG)
if not pid: if not pid:
continue ## Wasn't this one that died continue ## Wasn't this one that died
elif pid == -1: elif pid == -1: