Question on interprocess communication and signals
Reiner Wilhelms
reiner at jabberwock.shs.ohio-state.edu
Thu Aug 30 05:41:00 AEST 1990
Question 1.
----------
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?
The Problem:
------------
I have one program, call it B, which reads a file of
vectors, displays them on the screen, and then enters an interactive
mode in which it is possible to perform geometric transformations of
the data - rotation, scaling etc. As the program was designed for
SunView, it enters the SunView subroutine window_main_loop() after
building up a control panel and reading the data for display. It
remains in the window_main_loop until it exits. To make this program
read the next file for display, one could for example define a special
button which, when pressed, results in calling a subroutine to read
the file.
Now I am writing another interactive program, call it A, which
generates the data for B.
Question 2:
-----------
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?
Any suggestions are highly appreciated.
Reiner
More information about the Comp.unix.questions
mailing list