correct retrieving return value of os.waitpid()

This commit is contained in:
Guido van Rossum 1996-01-25 18:13:30 +00:00
parent eacce12fdc
commit 5bb05da6f7

View file

@ -290,7 +290,7 @@ class ForkingMixIn:
def collect_children(self): def collect_children(self):
"""Internal routine to wait for died children.""" """Internal routine to wait for died children."""
while self.active_children: while self.active_children:
pid = os.waitpid(0, os.WNOHANG) pid, status = os.waitpid(0, os.WNOHANG)
if not pid: break if not pid: break
self.active_children.remove(pid) self.active_children.remove(pid)