Proper behaviour for wait()?
Valentin Nechayev
netch at iv.nn.kiev.ua
Sat May 31 00:52:15 PDT 2003
Fri, May 30, 2003 at 22:00:18, pherman (Paul Herman) wrote about "Proper behaviour for wait()?":
PH> anyone know what the "proper" behavior for wait() is when SIGCHLD
PH> is ignored? Is it simply undefined? Don't see anything mentioned
PH> in the wait(2) manpage one way or tother, and other OSes don't seem
PH> to agree much.
Citing SUSv2:
SA_NOCLDWAIT
If set, and sig equals SIGCHLD, 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]. Otherwise,
terminating child processes will be transformed into zombie
processes, unless SIGCHLD is set to SIG_IGN.
The same for SUSv3.
-netch-
More information about the freebsd-hackers
mailing list