signals?

Antony A. Courtney antony at lbl-csam.arpa
Mon Dec 11 07:50:52 AEST 1989


In article <14757 at boulder.Colorado.EDU> bri at boulder.Colorado.EDU (Brian Ellis) writes:
>In article <846 at usl.usl.edu> pcb at usl.usl.edu (Peter C. Bahrs) writes:
>>I want to send the server an urgent message from within a client
>>application.  I want the server to stop what it is doing, handle
>>the request and continue (interrupt-ish).
>>I think I want to set a signal on incoming socket messages?
>
>	You can arrange to have SIGIO delivered to your server when
>	a read is possible from a descriptor (your socket). see fcntl(2).
>	Or you could open up a second socket and use out-of-band stuff.
>
>	-brian ellis (bri at boulder.Colorado.EDU)


I don't get the impression that this is really what this guy wants.  Maybe I'm
reading things wrong, but I get the impression that he has no problem reading
stuff off the client when the client has something to write to the server. The
issue is how the client can give the server a "kick" of sorts when there is
some reason the server is busy doing other things.  The best way to do this
_IS_ with out-of-band data, but there is no need to set up another socket
specifically for that purpose.  When the client does a send() with OOB data,
the server will get a SIGURG {if it has asked for it}, and will jump to the
user-installed signal handler if one exists.  This signal handler can then do a
recv() off of the socket to get the out-of-band mesage.  I don't really feel
like going into details--look in the UNIX Programmer's manual supplementary
docs, volume 1 for more info.  

"An Advanced 4.3BSD Interprocess Communication Tutorial", Leffler, et al., 
	Berkeley, CA, USENIX association, 1987.

Look in PS1:8-24...

Good luck..

			antony
--
*******************************************************************************
Antony A. Courtney				antony at lbl.gov
Advanced Development Group			ucbvax!lbl-csam.arpa!antony
Lawrence Berkeley Laboratory			AACourtney at lbl.gov



More information about the Comp.unix.questions mailing list