Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Content-Type: text/plain;
  charset="iso-8859-1"
From: Laurent Pinchart <laurent.pinchart@capflow.com>
Organization: Capflow
To: cygwin@cygwin.com
Subject: Re: OpenSSH and WinCVS in Windows 9x
Date: Thu, 8 Aug 2002 20:48:14 +0200
User-Agent: KMail/1.4.1
References: <20020806140534.757a155a.steven.obrien2@ntlworld.com> <200208081932.25737.laurent.pinchart@capflow.com> <20020808175335.GG11425@redhat.com>
In-Reply-To: <20020808175335.GG11425@redhat.com>
MIME-Version: 1.0
Message-Id: <200208082048.14548.laurent.pinchart@capflow.com>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id g78IkA908542

> 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@select.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...

Laurent Pinchart


--
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/

