summaryrefslogtreecommitdiff
path: root/Lib/subprocess.py
diff options
context:
space:
mode:
authorGregory P. Smith <greg@mad-scientist.com>2008-06-01 23:44:46 +0000
committerGregory P. Smith <greg@mad-scientist.com>2008-06-01 23:44:46 +0000
commit26660401c0c7b0816392bb32bdb69eb75a3b17df (patch)
tree5047b8ecfea86e3c3cbdb8612f7ae58773a35ba4 /Lib/subprocess.py
parent1a34834e0993d46fc81f4ef6639e6c278d5879d9 (diff)
downloadcpython-git-26660401c0c7b0816392bb32bdb69eb75a3b17df.tar.gz
Backport r62724 from trunk. Fixes issue 2791. subprocess.Popen.communicate
now closes its stdout and stderr fds as soon as it is finished with them.
Diffstat (limited to 'Lib/subprocess.py')
-rw-r--r--Lib/subprocess.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/subprocess.py b/Lib/subprocess.py
index 094ca1ba88..31c02df7af 100644
--- a/Lib/subprocess.py
+++ b/Lib/subprocess.py
@@ -660,8 +660,10 @@ class Popen(object):
self.stdin.close()
elif self.stdout:
stdout = self.stdout.read()
+ self.stdout.close()
elif self.stderr:
stderr = self.stderr.read()
+ self.stderr.close()
self.wait()
return (stdout, stderr)