delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/08/08/16:33:06

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Thu, 8 Aug 2002 16:32:59 -0400
From: Christopher Faylor <cgf AT redhat DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: OpenSSH and WinCVS in Windows 9x
Message-ID: <20020808203259.GB14854@redhat.com>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <20020806140534 DOT 757a155a DOT steven DOT obrien2 AT ntlworld DOT com> <200208081932 DOT 25737 DOT laurent DOT pinchart AT capflow DOT com> <20020808175335 DOT GG11425 AT redhat DOT com> <200208082048 DOT 14548 DOT laurent DOT pinchart AT capflow DOT com>
Mime-Version: 1.0
In-Reply-To: <200208082048.14548.laurent.pinchart@capflow.com>
User-Agent: Mutt/1.3.23.1i

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
>> 9x.
>
>That's bad news :-(
>
>From the cygwin code (peek_pipe AT select DOT cc), I assume that PeekNamedPipe 
>returns a negative value for lpTotalBytesAvail on EOF in win2k, and 0 in 
>win9x.
>
>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.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019