mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
close subprocess.PIPE file descriptors when the child encounters an error prior to exec.
This commit is contained in:
parent
9d3b6e9822
commit
211248b214
2 changed files with 47 additions and 3 deletions
|
@ -1274,9 +1274,6 @@ class Popen(object):
|
|||
if e.errno != errno.ECHILD:
|
||||
raise
|
||||
child_exception = pickle.loads(data)
|
||||
for fd in (p2cwrite, c2pread, errread):
|
||||
if fd is not None:
|
||||
os.close(fd)
|
||||
raise child_exception
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue