This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eryksun
Recipients docs@python, eryksun, neologix, owenlin, santagada, sbt, vstinner
Date 2019-07-24.20:56:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1564001803.32.0.659253313044.issue19809@roundup.psfhosted.org>
In-reply-to
Content
> This is still the case on windows as the pipes created to talk to the
> process might be inherited by two or more simultaneous CreateProcess 
> calls.

subprocess already uses PROC_THREAD_ATTRIBUTE_HANDLE_LIST to address this problem, at least between its own subprocess.Popen calls. The handles in the list still have to be inheritable, so it does not solve the problem with os.system and os.spawn* calls that are concurrent with subprocess.Popen -- nor extension-module, ctypes, cffi, or PyWin32 code  in the wild that inherits handles without PROC_THREAD_ATTRIBUTE_HANDLE_LIST. There's a warning about this in the docs:

https://docs.python.org/3/library/subprocess.html#subprocess.STARTUPINFO.lpAttributeList

It's why we can't use the handle list to implement pass_fds in Windows and why the general capability is buried in STARTUPINFO, instead of being exposed as a high-level Popen parameter.
History
Date User Action Args
2019-07-24 20:56:43eryksunsetrecipients: + eryksun, vstinner, santagada, neologix, docs@python, sbt, owenlin
2019-07-24 20:56:43eryksunsetmessageid: <1564001803.32.0.659253313044.issue19809@roundup.psfhosted.org>
2019-07-24 20:56:43eryksunlinkissue19809 messages
2019-07-24 20:56:43eryksuncreate