parents, children and signals

Joel Coltoff coltoff at burdvax.UUCP
Tue Jun 4 01:23:54 AEST 1985


<< DANGER - MEN AT REST >>

I am developing an application on 4.2bsd that is a single parent family
with two children. Each of the children already has a catcher for ^C
and it is important that this be maintained. What I need the parent to
do is sense the ^C and then send it to the appropriate child. What I am
doing now is telling the children to ignore SIGQUIT and use that as a
psuedo SIGINT to the parent. When I release this program to the users
I would like them to be able to use SIGINT. The reason being they are
used to doing this when they run either of the children as a single process.
Is there anyway I can get the parent to see the interrupt first and then
have it decide which child sees it?

Also, the parent has a trap set up for SIGCHLD. Is there a clever way to
tell which child caused this to happen? I really don't want to include
the code for ps in my program. For this application it is sufficient
to know only which child's status has changed not what the new status is.

	Thanks in advance,
	  - Joel {psuvax1,sdcrdcf}burdvax!coltoff



More information about the Comp.lang.c mailing list