diff options
Diffstat (limited to 'Lib/subprocess.py')
-rw-r--r-- | Lib/subprocess.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/subprocess.py b/Lib/subprocess.py index 391edcae1e..bd158f6660 100644 --- a/Lib/subprocess.py +++ b/Lib/subprocess.py @@ -1139,6 +1139,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 |