[New-bugs-announce] [issue2791] subprocess.py leaks fd in communicate

Joel Rosdahl report at bugs.python.org
Thu May 8 14:22:45 CEST 2008


New submission from Joel Rosdahl <python-bugs at joel.rosdahl.net>:

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.

----------
components: Library (Lib)
files: subprocess-fd-problem.py
messages: 66415
nosy: jrosdahl
severity: normal
status: open
title: subprocess.py leaks fd in communicate
type: resource usage
versions: Python 2.5
Added file: http://bugs.python.org/file10221/subprocess-fd-problem.py

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2791>
__________________________________


More information about the New-bugs-announce mailing list