Checking for waiting characters

Kenneth Ng KEN%NJITCCCC.BITNET at wiscvm.wisc.edu
Fri May 2 01:34:19 AEST 1986


On Unix System V version 2 on an AT&T 3b5, has anyone been able to
successfully test if characters are pending?  I've got an application
that needs to time out after a certain amount of time if no characters
come through.  Every read I've done seems to wait for characters.
To date, I've tried setting -icanon on standard in, I've set the EOL
value to 50, which according to the documentation should give me a time
out of 5 seconds, and I've set the O_NDELAY on a fcntl() to standard
input.  Any help or suggestions would be greatly appreciated.



More information about the Comp.unix.wizards mailing list