New submission from STINNER Victor:

subprocess.Popen has a race condition on Windows with file descriptors: if two 
threads spawn subprocesses at the same time, unwanted file descriptors may be 
inherited, which lead to annoying issues like "cannot delete a file because it 
is open by another process". For the issue #19575 for an example of such bug.

Since Windows Vista, a list of handle which should be inherited can be 
specified in CreateProcess() using PROC_THREAD_ATTRIBUTE_HANDLE_LIST with 
STARTUPINFOEX. It avoids the need to mark the handle temporarly inheritable.

For more information, see:
http://www.python.org/dev/peps/pep-0446/#only-inherit-some-handles-on-windows

----------
messages: 204314
nosy: Bernt.Røskar.Brenna, haypo, sbt
priority: normal
severity: normal
status: open
title: subprocess: use PROC_THREAD_ATTRIBUTE_HANDLE_LIST with STARTUPINFOEX on 
Windows Vista
type: enhancement
versions: Python 3.5

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue19764>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to