input ready under UNIX ??!!??

Leslie Mikesell les at chinet.chi.il.us
Sat Oct 29 04:22:56 AEST 1988


In article <320 at auspex.UUCP> guy at auspex.UUCP (Guy Harris) writes:

>>(1)  Using fcntl(2), set file descriptor 0 to be non-blocking (what
>>fcntl(5) calls O_NDELAY).  If you want line-at-a-time input, keep

>...
>this means the bottom line is "'read()' will return 0 if no data has
>been entered yet."

On the AT&T 3b2 SysVr3.[01] logging in through the starlan network
(streams based tty emulation) read() will return -1 when no data
is available (and O_NDELAY is set).

Les Mikesell



More information about the Comp.unix.questions mailing list