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: Guy Harris <guy@xxxxxxxxxx>
Date: Wed, 23 Apr 2003 12:06:56 -0700
On Wed, Apr 23, 2003 at 06:22:58PM +0100, Graeme Hewson wrote:
> Since Ethereal calls wait() (in capture.c:wait_for_child) very soon
> after the child process finishes, I think the best thing to do is not
> to call signal() under a POSIX-compliant system.  The attached patch
> works under Red Hat 9, Mandrake 7.0 (2.2 kernel) and Solaris 7.

	...

> +#ifndef _POSIX_SOURCE
>      signal(SIGCHLD, SIG_IGN);
> +#endif

At least according to my copy of IEEE Std 1003.1-1988, _POSIX_SOURCE is
a feature test macro, and, at least as I read it and my copy of ISO/IEC
9945-1, feature test macros are macros that the *application* defines in
order to control the name space that's exposed by system header files,
not macros defined by the environment to indicate whether it's
POSIX-compliant or not.

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.