This is the mail archive of the
mailing list for the Cygwin project.
Re: OpenSSH and WinCVS in Windows 9x
On Thu, Aug 08, 2002 at 08:48:14PM +0200, Laurent Pinchart wrote:
>> The problem is not in cygwin. If you are communicating with pipes
>> between non-cygwin application and a cygwin application and expecting
>> EOF notification on pipes you are not going to get it. Microsoft
>> doesn't provide any reliable way of finding that information on Windows
>That's bad news :-(
>From the cygwin code (firstname.lastname@example.org), I assume that PeekNamedPipe
>returns a negative value for lpTotalBytesAvail on EOF in win2k, and 0 in
>I'll write a simple application to check that tomorrow.
>BTW I looked at the putty code, and it uses a thread to read from stdin.
>Well, I still think it should be possible to get notified of such an event.
>feof() from mscvrt manages to do so...
feof on msvcrt is not interruptible by a signal using the UNIX paradigm
and probably doesn't use PeekNamedPipe before performing a ReadFile.
If you're just using a ReadFile to read from a pipe, then it will, of
course handle an eof. Cygwin can't do things that simply.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html