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.