Eryk Sun added the comment:

We can't reliably distinguish file descriptors from OS handles. They're 
overlapping sets of integers. A separate pass_handles parameter would be 
needed. The bigger problem with that idea is that the handles in the list have 
to be made inheritable before calling CreateProcess. Thus using pass_fds or 
pass_handles would have a race condition with concurrent CreateProcess calls 
that inherit all inheritable handles, such as Popen with close_fds=False, 
spawn*(), and system(). That's not consistent with how pass_fds works on Unix.

This proposed change doesn't solve the race condition problem in general, but 
it solves the problem if only subprocess.Popen is used and child processes are 
limited to inheriting the STARTUPINFO standard handles and handle_list.

----------

_______________________________________
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