how do you time-out on a read?

drockwel at bbn-vax drockwel at bbn-vax
Sat Jul 23 22:48:00 AEST 1983


From:  Dennis Rockwell <drockwel at bbn-vax>

The simplest way to timeout a read is to use the alarm(II) system call.
This will send your process a signal (SIGALRM) after n seconds.  The
read will terminate with an error (EINTR), and the routine which
catches the signal can set a flag to be tested when the read does so.



More information about the Comp.unix.wizards mailing list