diff options
author | Gregory P. Smith <greg@mad-scientist.com> | 2008-06-01 23:44:46 +0000 |
---|---|---|
committer | Gregory P. Smith <greg@mad-scientist.com> | 2008-06-01 23:44:46 +0000 |
commit | 26660401c0c7b0816392bb32bdb69eb75a3b17df (patch) | |
tree | 5047b8ecfea86e3c3cbdb8612f7ae58773a35ba4 /Lib/subprocess.py | |
parent | 1a34834e0993d46fc81f4ef6639e6c278d5879d9 (diff) | |
download | cpython-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.py | 2 |
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) |