➜

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.

作者 vstinner
收信人 Bernt.Røskar.Brenna, sbt, vstinner
日期 2013-11-28.16:35:01
SpamBayes Score -1.0
Marked as misclassified 是
Message-id <1385656502.33.0.535882915878.issue19764@psf.upfronthosting.co.za>
In-reply-to
内容
I read again the following blog post:
http://blogs.msdn.com/b/oldnewthing/archive/2011/12/16/10248328.aspx

I understood the purpose of PROC_THREAD_ATTRIBUTE_HANDLE_LIST.

Let say that two Python threads create a Popen object with a pipe for stdout:

* Thread A : pipe 1
* Thread B : pipe 2
* Main thread has random inheritable files and sockets

Handles of the both pipes are inheritable. Currently, thread A may inherit pipe 2 and thread B may inherit pipe 1 depending exactly when pipes are created and marked as inheritable, and when CreateProcess() is called.

Using PROC_THREAD_ATTRIBUTE_HANDLE_LIST, thread A will only inherit pipe 1, not pipe 2 nor inheritable handles of the other threads. Thread B will only inherit pipe 1, no other handle. It does not matter that CreateProcess() is called with bInheritHandles=TRUE nor that there are other inheritable handles.
历史
日期 用户 动作 参数
2013-11-28 16:35:02vstinner修改recipients: + vstinner, Bernt.Røskar.Brenna, sbt
2013-11-28 16:35:02vstinner修改messageid: <1385656502.33.0.535882915878.issue19764@psf.upfronthosting.co.za>
2013-11-28 16:35:02vstinner链接issue19764 messages
2013-11-28 16:35:01vstinner创建