Hey, what about SIGIO?

Joel Clark joel at isc.intel.com
Fri Sep 28 10:51:52 AEST 1990


In article <1990Sep26.184409.10155 at athena.mit.edu> jik at athena.mit.edu (Jonathan I. Kamens) writes:
>In article <LUSH.90Sep26102017 at athena0.EE.MsState.Edu>, lush at EE.MsState.Edu (Edward Luke) writes:
>|> I would like to get a signal when new data arrives on an
>|> input file descriptor, or when an output file descriptor is free to be
>|> filled again.  Is it possible for me to do this without using fork()
>|> Just what is the SIGIO signal for?
>
>  See the man page fcntl(2).  You want to use the F_SETOWN fcntl call on the
>.....
>  Oh, you'll also get SIGURG when there is an "urgent condition" on a socket;
						^^^^^^^^^^^^^^^^
>I'm not completely sure what an "urgent condition" is, perhaps that's what
>they call a premature closing of the other end of the socket or something.
>-- 
>Jonathan Kamens			              USnail:
>MIT Project Athena				11 Ashford Terrace
>jik at Athena.MIT.EDU				Allston, MA  02134
>Office: 617-253-8495			      Home: 617-782-0710


An "urgent condition" is when Out Of Band data arrives.  This is data
sent with the MSG_OOB flag set. i.e. "send(fd,buf,buflen,MSG_OOB)"
This is generally used to send signals such as interrupt when a DEL
key is hit.  Thus the receiving process can handle the SIGURG signal
by reading and tossing all the data in the socket upto the MSG_OOB
data if this is what it needs to do.

Joel Clark
Intel Scientific Computers
joel at isc.intel.com






line fodder



More information about the Comp.unix.programmer mailing list