Message204314
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 |
|
Date |
User |
Action |
Args |
2013-11-25 09:01:56 | vstinner | set | recipients:
+ vstinner, Bernt.Røskar.Brenna, sbt |
2013-11-25 09:01:55 | vstinner | set | messageid: <1385370115.99.0.757096187315.issue19764@psf.upfronthosting.co.za> |
2013-11-25 09:01:55 | vstinner | link | issue19764 messages |
2013-11-25 09:01:55 | vstinner | create | |
|