Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!philabs!cmcl2!harvard!caip!lll-crg!lll-lcc!vecpyr!altos86!andy From: andy@altos86.UUCP (Andy Hatcher) Newsgroups: net.unix-wizards Subject: Re: System V and SIGCLD Message-ID: <211@altos86.altos86.UUCP> Date: Fri, 9-May-86 11:59:14 EDT Article-I.D.: altos86.211 Posted: Fri May 9 11:59:14 1986 Date-Received: Sun, 11-May-86 05:42:02 EDT References: <709@cheviot.uucp> Reply-To: andy@altos86.UUCP (Andy Hatcher) Organization: Altos Computer Systems, San Jose, CA. Lines: 22 # # 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.