Article ID: 2009703 - View products that this article applies to.
The problem occurs with applications while one thread is reading from the stdin and another thread which tries to load a DLL and tries to get hold of that handle (inherited).
This stack you typically see if you analyze your hang using debugging tools.
You can't have more than one IO (GetStdHandle counts as "IO") on the same synchronous file object. It is a race condition as to whether the child process will call GetFileType() called before the parent gets back to its ReadFile().
GetFileType() is another form of IO, just like ReadFile() and WriteFile(). This is
So if there is synchronous IO already pending (such as a ReadFile/Writefile) on another
There were in-depth design changes for the GetFileType implemenation in Vista, so this kind of hang will not be seen in newer Operating Systems.
(http://go.microsoft.com/fwlink/?LinkId=151500)for other considerations.
Article ID: 2009703 - Last Review: January 13, 2010 - Revision: 2.0
Contact us for more help
Connect with Answer Desk for expert help.