summaryrefslogtreecommitdiffstats
path: root/Lib/subprocess.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-02-14 17:04:26 (GMT)
committerGeorg Brandl <georg@python.org>2009-02-14 17:04:26 (GMT)
commit78162daff670696e64d570ed070fbda33b25890d (patch)
tree13094b4e1914fd672442e9197eac2f65e0a1d4c5 /Lib/subprocess.py
parent02bdf93b85e168f2b9015f1a59fc2487acba0e01 (diff)
downloadcpython-78162daff670696e64d570ed070fbda33b25890d.zip
cpython-78162daff670696e64d570ed070fbda33b25890d.tar.gz
cpython-78162daff670696e64d570ed070fbda33b25890d.tar.bz2
Merged revisions 69620 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r69620 | georg.brandl | 2009-02-14 18:01:36 +0100 (Sa, 14 Feb 2009) | 1 line #5179: don't leak PIPE fds when child execution fails. ........
Diffstat (limited to 'Lib/subprocess.py')
-rw-r--r--Lib/subprocess.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/subprocess.py b/Lib/subprocess.py
index 935827a..29a3d59 100644
--- a/Lib/subprocess.py
+++ b/Lib/subprocess.py
@@ -1103,6 +1103,9 @@ class Popen(object):
if data != "":
os.waitpid(self.pid, 0)
child_exception = pickle.loads(data)
+ for fd in (p2cwrite, c2pread, errread):
+ if fd is not None:
+ os.close(fd)
raise child_exception