-
Signal Handlers
Hi
I have a program with two forks and a parent process runinng. When ^Z is inputed, if the parent catches it, it kills the children, if a child catches it, it tells the parent and the parent kills the other child.
I am having problems figuring out how to accomplish this.
Should each child share its own handler, or should the parent and both children have a common handler?
Thanks
-
What you want is kill(). And use SIGUSR1 for your inter-process signalling.
Of course, there many other ways for inter-process communication: pipes, FIFOs, message queues, shared memory, and even sockets (all SVR4 stuff).
gg