commit | 26660401c0c7b0816392bb32bdb69eb75a3b17df | [log] [tgz] |
---|---|---|
author | Gregory P. Smith <greg@mad-scientist.com> | Sun Jun 01 23:44:46 2008 +0000 |
committer | Gregory P. Smith <greg@mad-scientist.com> | Sun Jun 01 23:44:46 2008 +0000 |
tree | 5047b8ecfea86e3c3cbdb8612f7ae58773a35ba4 | |
parent | 1a34834e0993d46fc81f4ef6639e6c278d5879d9 [diff] [blame] |
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.
diff --git a/Lib/subprocess.py b/Lib/subprocess.py index 094ca1b..31c02df 100644 --- a/Lib/subprocess.py +++ b/Lib/subprocess.py
@@ -660,8 +660,10 @@ 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)