Author eryksun
Recipients Bernt.Røskar.Brenna, Segev Finer, eryksun, gregory.p.smith, paul.moore, sbt, steve.dower, tim.golden, vstinner, zach.ware
Date 2017-05-31.04:12:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1496203927.94.0.958731537647.issue19764@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2017-05-31 04:12:08eryksunsetrecipients: + eryksun, gregory.p.smith, paul.moore, vstinner, tim.golden, Bernt.Røskar.Brenna, sbt, zach.ware, steve.dower, Segev Finer
2017-05-31 04:12:07eryksunsetmessageid: <1496203927.94.0.958731537647.issue19764@psf.upfronthosting.co.za>
2017-05-31 04:12:07eryksunlinkissue19764 messages
2017-05-31 04:12:07eryksuncreate