RE: Pipe syncronization and incompatibility between Cygwin and .NET Framework 4.0

2013-12-23 Thread James Johnston
> I am calling a few different .NET Framework 4.0 command line tools from > Cygwin and have noted that .NET Framework 4.0 introduced a change that > causes an incompatibility between it and Cygwin. I have carefully examined > .NET Framework 4.0 source code and also checked things out with an API >

RE: Pipe syncronization and incompatibility between Cygwin and .NET Framework 4.0

2013-12-23 Thread James Johnston
> > Check line 192 for a call to the WaitForAvailableConsoleInput function. > > I guess they expect hFile to be a console handle (which IS waitable). > > And my guess that they added the Peek intentionally to prevent the WaitFor > call from slipping through (as we've seen it does, otherwise) on t

RE: Pipe syncronization and incompatibility between Cygwin and .NET Framework 4.0

2013-12-23 Thread James Johnston
(apologies to the list; I accidentally sent this reply directly to Anton and so his reply that he just sent will appear out of order on the list archive). Hi Anton, Thanks for the response. Comments below... > MSDN does not list pipe handles as waitable with WaitForMultipleObjectsEx > (only a u

RE: Pipe syncronization and incompatibility between Cygwin and .NET Framework 4.0

2013-12-23 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
> Check line 192 for a call to the WaitForAvailableConsoleInput function. I guess they expect hFile to be a console handle (which IS waitable). And my guess that they added the Peek intentionally to prevent the WaitFor call from slipping through (as we've seen it does, otherwise) on things that w

RE: Pipe syncronization and incompatibility between Cygwin and .NET Framework 4.0

2013-12-20 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
MSDN does not list pipe handles as waitable with WaitForMultipleObjectsEx (only a user comment at the end does). If you trace execution without PeekNamedPipe(), you'll see that WaitForMultipleObjectsEx() returns immediately, and that it is ReadFile() that blocks and waits for the input (which will