classification
Title: subprocess.py leaks fd in communicate
Type: resource usage
Components: Library (Lib) Versions: Python 2.5
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: jrosdahl
Priority: Keywords:

Created on 2008-05-08 12:22 by jrosdahl, last changed 2008-05-08 12:22 by jrosdahl.

Files
File name Uploaded Description Edit Remove
subprocess-fd-problem.py jrosdahl, 2008-05-08 12:22 Code triggering the problem
Messages
msg66415 (view) Author: Joel Rosdahl (jrosdahl) Date: 2008-05-08 12:22
The optimization in SVN rev 38556 seems to have changed
Popen.communicate's behavior when stdout is subprocess.PIPE (and maybe
for other cases as well).

See the attached file. In Python 2.4.5, all three counts are the same.
In Python 2.5.2, the middle count has increased by 1. In other words: A
file descriptor is leaked until the last reference to the Popen instance
is dropped.
History
Date User Action Args
2008-05-08 12:22:43jrosdahlcreate