[BusyBox] Init
Thomas Gleixner
tglx at linutronix.de
Sat Aug 24 08:32:03 UTC 2002
On Sat, 2002-08-24 at 15:58, Vladimir N. Oleynik wrote:
Vladimir,
> Init wait all own childs (after fork). If not -
> this bug and require find it.
That's working correct. There is no bug .
> Init must not wait other child.
It must, because it get's new children without knowing of them. :)
Terminating a process does not terminate its child processes. Instead,
the parent process ID of _all_ of the calling-process child processes
and zombie child processes is set to the process ID of init. The init
process inherits each of these processes, and catches their SIGCHLD
signals and calls the wait subroutine for each of them.
If init sets SIG_DFL then init will not get a SIGCHLD signal, but the
kernel waits, that init calls waitxxx for this child. If you set SIG_IGN
then the kernel immidiately removes the child process.
linux/kernel/signal.c
* Note the silly behaviour of SIGCHLD: SIG_IGN means that the
* signal isn't actually ignored, but does automatic child
* reaping, while SIG_DFL is explicitly said by POSIX to force
* the signal to be ignored.
*/
--
Thomas
____________________________________________________
linutronix - competence in embedded & realtime linux
http://www.linutronix.de
mail: tglx at linutronix.de
More information about the busybox
mailing list