Best way to prevent zombie processes
Marko Rauhamaa
marko at pacujo.net
Mon Jun 1 06:25:21 EDT 2015
Cecil Westerhof <Cecil at decebal.nl>:
> It works. What I find kind of strange because
> https://docs.python.org/2/library/signal.html
You should not rely on Python documentation on Linux system specifics.
The wait(2) manual page states:
POSIX.1-2001 specifies that if the disposition of SIGCHLD is set to
SIG_IGN or the SA_NOCLDWAIT flag is set for SIGCHLD (see
sigaction(2)), then children that terminate do not become zombies
and a call to wait() or waitpid() will block until all children have
terminated, and then fail with errno set to ECHILD. (The original
POSIX standard left the behavior of setting SIGCHLD to SIG_IGN
unspecified. Note that even though the default disposition of
SIGCHLD is "ignore", explicitly setting the disposition to SIG_IGN
results in different treatment of zombie process children.)
Marko
More information about the Python-list
mailing list