delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1998/09/24/06:42:29

From: cgf AT cygnus DOT com (Christopher Faylor)
Subject: Re: select() and EOF
24 Sep 1998 06:42:29 -0700 :
Message-ID: <19980924093905.A18368.cygnus.cygwin32.developers@cygnus.com>
References: <01BDE74A DOT 4E07EBA0 AT sos>
Mime-Version: 1.0
To: Sergey Okhapkin <sos AT prospect DOT com DOT ru>,
"'cygwin32-developers AT cygnus DOT com'" <cygwin32-developers AT cygnus DOT com>

On Wed, Sep 23, 1998 at 11:31:34PM +0400, Sergey Okhapkin wrote:
>Hi!
>
>According to the following code fragment from tcl test suite:
>
>if {[info commands testfilewait] != ""} {
>    test event-13.8 {Tcl_WaitForFile procedure, waiting indefinitely} unixOnly {
>	set f [open "|sleep 2" r]
>	set result ""
>	lappend result [testfilewait $f readable 100]
>	lappend result [testfilewait $f readable -1]
>	close $f
>	set result
>    } {{} readable}
>}
>
>
>select() call should mark file descriptor as readable on EOF contition, isn't it?

Yup.  It looks like it.  I just tested this on Linux.  It should flag both an
exception and a "read ready".

I'll make that change.

-- 
cgf AT cygnus DOT com
http://www.cygnus.com/

- Raw text -


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