Mercurial > cpython-lru_cache-weakref
diff Lib/subprocess.py @ 51637:15d8b2db2be4 2.6
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.
........
| author | Georg Brandl <georg@python.org> |
|---|---|
| date | Sat, 14 Feb 2009 17:04:26 +0000 |
| parents | 6416e6044a30 |
| children | 7111845c2f5e |
line wrap: on
line diff
--- a/Lib/subprocess.py Sat Feb 14 14:14:10 2009 +0000 +++ b/Lib/subprocess.py Sat Feb 14 17:04:26 2009 +0000 @@ -1103,6 +1103,9 @@ 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
