Message294810
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. |
|
Date |
User |
Action |
Args |
2017-05-31 04:12:08 | eryksun | set | recipients:
+ 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:07 | eryksun | set | messageid: <1496203927.94.0.958731537647.issue19764@psf.upfronthosting.co.za> |
2017-05-31 04:12:07 | eryksun | link | issue19764 messages |
2017-05-31 04:12:07 | eryksun | create | |
|