Question on interprocess communication and signals

Conor P. Cahill cpcahil at virtech.uucp
Thu Aug 30 10:53:51 AEST 1990


In article <265 at jabberwock.shs.ohio-state.edu> reiner at jabberwock.shs.ohio-state.edu (Reiner Wilhelms) writes:
>In signal.h are two signals defined:
>#define SIGUSR1 30      /* user defined signal 1 */
>#define SIGUSR2 31      /* user defined signal 2 */
>
>How can they be generated?  (In the man pages I couldn't find a hint
>to this.) Does this relate to the following problem, and to question 2?

They are generated with the following system call:

	kill(pid,SIGUSR1) or kill(pid,SIGUSR2)


>How can one build a communication line between the two such that A
>dials B, and says: "Hey, I have a new data set for you!" Essentially
>program A "presses the read-new-data button" of program B.  What would
>the notification routine look like, and what kind of signals could I
>use to establish the cooperation of the two programs?

You could do zillions of different things.  Like each time through the
loop in B, it checks for a new data file in a given directory.  Or 
process A could send a signal to process B.  Or process A could send
the data in a message queue to process B, etc, etc, etc...
-- 
Conor P. Cahill            (703)430-9247        Virtual Technologies, Inc.,
uunet!virtech!cpcahil                           46030 Manekin Plaza, Suite 160
                                                Sterling, VA 22170 



More information about the Comp.unix.questions mailing list