But I don't wanna do non-blocking I/O...

stephen.a.rago sar0 at cbnewsl.att.com
Tue Jun 12 22:36:06 AEST 1990


In article <397 at minya.UUCP>, jc at minya.UUCP (John Chambers) writes:
> Subject: But I don't wanna do non-blocking I/O...
> Newsgroup: comp.unix.wizards
> 
> Well, here's a little puzzle that has me stumped;
...
> But fgets(buf,n,stdin) returns EOF immediately.
...
> 
> The open() does include F_NDELAY, but
> this is supposed to apply only to the open; it shouldn't
> set non-blocking I/O permanently for the file (I hope ;-).

Here's your problem.  If you open with O_NDELAY, your file
descriptor is in non-blocking mode until you explicitly turn
it off with fcntl.  O_NDELAY affects more than just the open.

Steve Rago
sar at attunix.att.com



More information about the Comp.unix.wizards mailing list