mirror of
https://github.com/python/cpython.git
synced 2025-12-04 16:43:27 +00:00
On UNIX, when the execution of the child fails, we must waitpid() to
prevent leaving zombies.
This commit is contained in:
parent
454f76711c
commit
f791d7a278
1 changed files with 1 additions and 0 deletions
|
|
@ -1023,6 +1023,7 @@ class Popen(object):
|
||||||
data = os.read(errpipe_read, 1048576) # Exceptions limited to 1 MB
|
data = os.read(errpipe_read, 1048576) # Exceptions limited to 1 MB
|
||||||
os.close(errpipe_read)
|
os.close(errpipe_read)
|
||||||
if data != "":
|
if data != "":
|
||||||
|
os.waitpid(self.pid, 0)
|
||||||
child_exception = pickle.loads(data)
|
child_exception = pickle.loads(data)
|
||||||
raise child_exception
|
raise child_exception
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue