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

2008-12-08 Thread Mark Mentovai

Mark Mentovai <[EMAIL PROTECTED]> 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:

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

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

___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3210>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38435] Start the deprecation cycle for subprocess preexec_fn

2022-03-16 Thread Mark Mentovai


Mark Mentovai  added the comment:

Another use case for preexec_fn: establishing a new controlling terminal, 
typically in conjunction with start_new_session=True. A preexec_fn may do 
something like

os.close(os.open(os.ttyname(sys.stdin.fileno(), os.O_RDWR)))

with discussion at 
https://chromium-review.googlesource.com/c/chromium/src/+/3524204/comments/59f03e7c_f103cd7e.

--
nosy: +markmentovai

___
Python tracker 
<https://bugs.python.org/issue38435>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com