On Wed, 23 Apr 2003 12:06:56 -0700, [EMAIL PROTECTED] (Guy Harris) wrote: > Furthermore, given that Ethereal calls "wait()" and actually wants to > report the termination of child processes due to signals, it's not > clear that it should do > > signal(SIGCHLD, SIG_IGN); > > on *any* platform.
The intention of the signal() call is to tell the kernel that we're not interested in knowing anything apart from the stuff we inspect in wait_for_child(), and that the kernel shouldn't make the child a zombie when it exits. When we call wait_for_child() we already know the child process has exited (or will shortly) due to EOF or some error on the pipe. There are no signals involved, since we don't set up a handler. Given the timings involved, I think the "signal(SIGCHLD, SIG_IGN)" call is no more than nicety. If the child exits before the wait() and becomes a zombie, it won't be a zombie for very long. So, coming from a different direction, I agree we should remove the call entirely.