Number of chars in input queue - terminal, keyboard
Doug Gwyn
gwyn at smoke.BRL.MIL
Wed Jan 10 20:28:42 AEST 1990
In article <1439 at sas.UUCP> jwd at sas.UUCP (John W. DeBoskey) writes:
> A BSD answer is to use FIONREAD, but sVr3 doesn't have it, and I've
>been unable to duplicate it.
There really is no even semi-standard way to obtain this information,
and in many UNIX implementations it cannot be obtained at all by
unprivileged processes.
Therefore the question should be asked, why do you think you need
this information? I have NEVER in many years of UNIX system
programming needed such information, which makes me suspect you
don't really need it either. If all you want to do is to avoid
blocking on a read from the terminal (the most common motivation
for such queries), other methods will accomplish that. System V
also provides a way to control input burst size, which may be what
you desire. Without more information about the application it is
hard to give good advice.
More information about the Comp.unix.wizards
mailing list