Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!zaphod.mps.ohio-state.edu!mips!prls!pyramid!cbmvax!uunet!virtech!cpcahil From: cpcahil@virtech.uucp (Conor P. Cahill) Newsgroups: comp.unix.questions Subject: Re: Question on interprocess communication and signals Keywords: interprocess communication, pipes, signals, notify procedure, SunView Message-ID: <1990Aug30.005351.5239@virtech.uucp> Date: 30 Aug 90 00:53:51 GMT References: <265@jabberwock.shs.ohio-state.edu> Reply-To: cpcahil@virtech.UUCP (Conor P. Cahill) Distribution: usa Organization: Virtual Technologies Inc., Sterling VA Lines: 27 In article <265@jabberwock.shs.ohio-state.edu> reiner@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