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
1 changed files with 1 additions and 1 deletions

View File

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