[issue3210] subprocess.Popen does not release process handles if process cannot be started

Mark Mentovai report at bugs.python.org
Mon Dec 8 21:53:26 CET 2008


Mark Mentovai <mark at moxienet.com> added the comment:

This is not limited to Windows.  I experience this bug on Mac OS X and
Linux as well.

http://mail.python.org/pipermail/python-list/2008-August/505753.html

Attachment 3210.py is a reduced testcase.  It attempts to execute nocmd,
which should not exist.  The expected behavior is for OSError to be
thrown each time, with ENOENT or EACCES set in the errno field,
depending on the environment.  Due to this bug, Python will hit the file
descriptor limit at some point instead.

For quick reproduction, set a low but reasonable limit on the number of
maximum open files:

mark at anodizer bash$ ulimit -n 256
mark at anodizer bash$ python 3210.py
250
Traceback (most recent call last):
  File "3210.py", line 11, in <module>
    raise e
OSError: [Errno 24] Too many open files

----------
nosy: +markmentovai
Added file: http://bugs.python.org/file12287/3210.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3210>
_______________________________________


More information about the Python-bugs-list mailing list