Message32471
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
|
|
Date |
User |
Action |
Args |
2007-08-23 14:58:27 | admin | link | issue1751245 messages |
2007-08-23 14:58:27 | admin | create | |
|