System V and SIGCLD

Andy Hatcher andy at altos86.UUCP
Sat May 10 01:59:14 AEST 1986


#
# sorry can't seem to mail this
#
You will probably get lots of replys to this one.

The problem is that you have not destroyed the dead child.
You should be doing a wait system call inside your signal routine,
otherwise when you leave the child is still there and you get the
same signal again.

This is the way it is deliberately implemented, if you have more
than one child that dies at the same time then you will continue
to reenter the signal handler until they are all gone.

	Andy Hatcher
	seismo!lll-crg!lll-lcc!vecpyr!altos86!andy


P.S.  I've always been told that it is a bad idea to put printfs in
a signal handling routine.   The signal handler is called asyncronously
and if you use stdio both inside and outside the signal handler you
could make it very confused.



More information about the Comp.unix.wizards mailing list