Bugs item #1751245, was opened at 2007-07-10 11:04 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1751245&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Library Group: Python 2.5 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Justin Francis (justinfrancis) Assigned to: Nobody/Anonymous (nobody) Summary: Popen pipe file descriptor leak on OSError in init Initial Comment: 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 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1751245&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com