Fix issue #16140 bug that the fix to issue #16327 added - don't double

close subprocess.PIPE file descriptors when the child encounters an
error prior to exec.
This commit is contained in:
Gregory P. Smith 2012-11-11 02:00:49 -08:00
parent 9d3b6e9822
commit 211248b214
2 changed files with 47 additions and 3 deletions

View file

@ -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