On UNIX, when the execution of the child fails, we must waitpid() to

prevent leaving zombies.
This commit is contained in:
Peter Astrand 2005-01-01 09:38:57 +00:00
parent 454f76711c
commit f791d7a278
1 changed files with 1 additions and 0 deletions

View File

@ -1023,6 +1023,7 @@ class Popen(object):
data = os.read(errpipe_read, 1048576) # Exceptions limited to 1 MB
os.close(errpipe_read)
if data != "":
os.waitpid(self.pid, 0)
child_exception = pickle.loads(data)
raise child_exception