This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author justinfrancis
Recipients
Date 2007-07-10.15:04:08
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
OS: Gentoo Linux 2.6.12-r6
Python: 2.5 r25:51908

When creating a Popen object that refers to a file that does not exist, the pipes that are created are not closed, and remain in the system. In long-running processes, this will eventually use up all the file descriptors available.

>> import os, subprocess
>> os.system('/usr/sbin/lsof | grep python | grep -i pipe')
...
python    18822 jfrancis    6r     FIFO        0,5               56188 pipe
python    18822 jfrancis    7r     FIFO        0,5               56190 pipe
>> p = subprocess.Popen('doesnotexist', stdout=subprocess.PIPE)
OSError: [Errno 2] No such file or directory
>> os.system('/usr/sbin/lsof | grep python | grep -i pipe')
...
python    18822 jfrancis    6r     FIFO        0,5               56188 pipe
python    18822 jfrancis    7r     FIFO        0,5               56190 pipe
python    18822 jfrancis    8r     FIFO        0,5               56713 pipe
History
Date User Action Args
2007-08-23 14:58:27adminlinkissue1751245 messages
2007-08-23 14:58:27admincreate