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.
........
This commit is contained in:
Georg Brandl 2009-02-14 17:04:26 +00:00
parent 02bdf93b85
commit 78162daff6
2 changed files with 19 additions and 0 deletions

View file

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