How can I read keyboard without stopping

Peter da Silva peter at ficc.UUCP
Wed Aug 17 04:46:09 AEST 1988


In article ... chip at ateng.uucp (Chip Salzenberg) writes:
> According to mouse at mcgill-vision.UUCP (der Mouse):
> >3) FIONREAD.  BSD systems have an ioctl you can apply to a terminal
> >   line to get the number of characters queued available for a read().

> [Xenix] it's a system call all its own: rdchk(fildes).

I believe that once upon a time on some system a stat() on a pipe would
return the number of characters in a pipe. Wouldn't it make sense to
have stat() on a terminal device return the number of characters available?
(and a stat() on /dev/mem return memory size, and...)
-- 
Peter da Silva, Ferranti International Controls Corporation, sugar!ficc!peter.
"You made a TIME MACHINE out of a VOLKSWAGEN BEETLE?"
"Well, I couldn't afford another deLorean."
"But how do you ever get it up to 88 miles per hour????"



More information about the Comp.unix.wizards mailing list