[so] SIG_IGN & SIGCHLD
Lucian Adrian Grijincu
lucian.grijincu at gmail.com
Mon Apr 21 01:43:31 EEST 2008
Unii dintre voi au fost curioși de ce, dacă by default, SIGCHLD e un
semnal ignorat, ignorarea lui a două oară (singal(SIGCHLD, SIG_IGN))
duce la trecerea peste starea zombie a proceselor copil.
UTFS: http://cs.pub.ro/~pso/lxr/source/kernel/signal.c?v=linux-2.6.24.2#1487
Username/pass sunt cele de pe curs.cs.pub.ro.
RTFM: wait(2)
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. ...
--
Lucian
More information about the so
mailing list