classification
Title: subprocess.Popen() may leak file descriptors
Type: resource usage Stage:
Components: Versions: Python 3.1, Python 2.7, Python 2.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: facundobatista Nosy List: facundobatista
Priority: normal Keywords: patch

Created on 2009-06-12 20:57 by facundobatista, last changed 2009-06-20 02:16 by facundobatista. This issue is now closed.

Files
File name Uploaded Description Edit
subprocess.py.diff facundobatista, 2009-06-12 20:57 Patch that assures that FDs are closed
Messages (2)
msg89301 - (view) Author: Facundo Batista (facundobatista) * (Python committer) Date: 2009-06-12 20:57
If something bad happens between a os.pipe() call is called, and the
returned file descriptors are closed, those file descriptors are never
closed.

In a long lived process this is a problem.

Patch (against trunk) to solve this is attached.
msg89535 - (view) Author: Facundo Batista (facundobatista) * (Python committer) Date: 2009-06-20 02:16
Applied the patch (slightly modified) to trunk (2.7), 2.6, and 3k branches.
History
Date User Action Args
2009-06-20 02:16:51facundobatistasetstatus: open -> closed
resolution: fixed
messages: + msg89535
2009-06-12 20:57:46facundobatistacreate