The new std.process is ready for review

Steven Schveighoffer schveiguy at yahoo.com
Sun Feb 24 17:09:32 PST 2013


On Sun, 24 Feb 2013 19:57:41 -0500, Vladimir Panteleev  
<vladimir at thecybershadow.net> wrote:

> On Monday, 25 February 2013 at 00:44:43 UTC, Steven Schveighoffer wrote:
>> 1. The file descriptor from stdin failed to come out, and windows gives  
>> back a valid handle from GetStdHandle
>> 2. The file descriptor is valid (0 or above), but  
>> _fdToHandle/_get_osfhandle fails to get a valid handle
>
> fileDescriptor is 0.
> The handle is 3. GetStdHandle(STD_INPUT_HANDLE) is also 3.
>
>> 3. We have a valid handle, but for some reason SetHandleInformation  
>> fails.
>
> Looks like it. Maybe you can't SetHandleInformation on standard handles  
> in Windows 7?

I suppose that is possible.  By default the normal stdin is used, so maybe  
the OS makes the decision on inheritance based on whether it is used or  
not.  Clearly it works for some people...

Did you try SetHandleInformation directly on that handle?  It's still  
slightly possible that some other call caused the exception while this one  
was being thrown.

-Steve


More information about the Digitalmars-d mailing list