Re: Possible bug in wait4(), 2.1.126-129 ?

Torbjorn Lindgren (tl@fairplay.no)
Tue, 24 Nov 1998 15:27:17 +0100 (CET)


On Mon, 23 Nov 1998, H. J. Lu wrote:
> > I suspect the difference is in the way that the configure script
> > interacted with the libc. In the USE_SIGCHLD case, you need
> > signal(SIGCLD, SIG_DFL) below the vfork to reset the signal handling
> > for the grandchild process.
>
> I was told the behavior of
>
> signal(SIGCHLD, SIG_IGN)
>
> is totally undefined under POSIX.

Possible, I don't have any references for that. It's definitely specified
in Single Unix v2 (http://www.UNIX-systems.org/version2/). (Neither have
wait4(), but..)

The Single Unix Specification, v2, man-page for signal() devotes a
paragraph of the detailed description to how that case should be handled:

[...]
If the action for the SIGCHLD signal is set to SIG_IGN, child processes of
the calling processes will not be transformed into zombie processes when
they terminate. If the calling process subsequently waits for its
children, and the process has no unwaited for children that were
transformed into zombie processes, it will block until all of its children
terminate, and wait(), wait3(), waitid() and waitpid() will fail and set
errno to [ECHILD].

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/