input ready under UNIX ??!!??

Guy Harris guy at auspex.UUCP
Fri Oct 28 09:48:38 AEST 1988


>Fortunately, there was a clue (`ICANON') in the above as to which O/S
>Rich Bono was using, namely either SysV or SunOS 4.x

Or OSx in the S5 universe, or perhaps HP/UX, or....

>Finally, under 4.{2,3,3-tahoe} BSD, you can use select()

Or under SunOS 4.x (or maybe OSx if they let you at "select()" in the S5
universe), or maybe HP/UX, or....

On most (probably all) of those systems, you can also use FIONREAD to
see whether 0 or >0 characters are waiting to be read.

(Isn't UNIX wonderful? It starts out with no way of doing something, and
then acquires N of them; cf.  IPC between unrelated processes, starting
with "well, you can sort of share a file", and ending up with, depending
on your UNIX version, some improper subset of {named pipes, sockets,
"streams pipes", streams/TLI network connections, S5 shared messages,
...}.)



More information about the Comp.unix.questions mailing list