Date: Tue, 9 Mar 1999 12:10:59 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Frank Heckenbach cc: djgpp-workers AT delorie DOT com, peter AT gerwinski DOT de Subject: Re: Patch for select() In-Reply-To: <124D6181.19990308212633.FOO-19CE.frank@goedel.fjf.gnu.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk [Redirected to djgpp-workers.] On Mon, 8 Mar 1999, Frank Heckenbach wrote: > while porting some GPC code to DJGPP, I found that select() has > different semantics regarding end of file under DJGPP than under > Un*x. DJGPP's select() returns `not ready' at the end of a regular > file (i.e., no character device under Dos), but select() under Un*x > returns `ready' in this situation (verified under Linux and > Solaris). Could you please elaborate under what circumstances does this make a difference? > + /* If it's a disk file, always return 1, since according to Un*x > + semantics, select() returns ``ready'' at EOF (and before EOF, > + anyway). */ What does this change do with stale handles (e.g., open a file on a floppy, then remove the disk from the drive, and *then* call select)?