Ethereal-dev: Re: [Ethereal-dev] [PATCH] POSIX SIGCHLD issue

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: ghewson@xxxxxxxxxxxxxxxxxxx (Graeme Hewson)
Date: Wed, 23 Apr 2003 20:53 +0100 (PDT)
On Wed, 23 Apr 2003 12:06:56 -0700, guy@xxxxxxxxxx (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.