How to get signal interrupt on file descriptor ?

Jeremy Cook jeremy at eik.ii.uib.no
Sun Apr 28 23:12:58 AEST 1991


I need to write a program which will read from file descriptors - in
one case a pipe and in another a socket. I would prefer to let the program
run passively and not have to poll the file descriptors to see when there's
data to be read, and I see that there's a SIGIO signal which has something to
do with i/o on file descriptors.

Is there any way that I can make use of SIGIO (or any other signal for
that matter)
to serve incomming data from file descriptors ? Just putting
'signal(SIGIO, doit)' in
my code didn't work - what else do I need to do ?


 Jeremy Cook,  email : jeremy at eik.ii.uib.no | phone : +47 5 54 41 74 (direct)
 Parallel Processing Laboratory, University of Bergen, 
 High Technology Centre, N-5020 Bergen,Norway



More information about the Comp.unix.programmer mailing list