[comp.unix.aix] problem with SIGCHLD

boote@bierstadt.scd.ucar.edu (Jeff W. Boote) (01/12/91)

I am writing an application that needs to fork off a few children and then
do some cleanup once they exit.  Therefor I register a signal handler using
the "signal" system call:

		 signal(SIGCHLD, sig_handler);

This works "most of the time" with the following exception:

	If I ever fork off more than one process everything works as expected
until the last process exits.  For some reason the SIGCHLD for that process
is blocked until the next fork.  It works fine if I only fork off one process
and then it exits - the SIGCHLD causes my handler to execute.  It also works
fine if I have more then one child process - until the last one which blocks
for some reason.

I just move this program over to a sparkstation running SunOS4.03c and the
signals work as expected.

If anyone has some insight into this problem PLEASE let me know what you
think.  Also, has anyone else noticed any problems with signals?  I realize
that signals are often system dependent so if I am simply missing the
point on how it should be working here please tell me that too.

Thanks,
jeff

-- 
Jeff W. Boote                   SCD/NCAR
boote@ncar.ucar.edu           Boulder, Colo