[BusyBox] init does not kill reparented processes (MYSTERY SOLVED)

Ignacio García Pérez iggarpe at terra.es
Fri Aug 27 12:07:40 MDT 2004


Hi,

In a previous message, I was complaining about init not doing its duty of
reaping zombie processes. I''ve found out why. I tried busybox-1.00-pre2 and
found it does not exibit the problem, and then noticed that init.c has
undergone a rewrite somewhere in between pre2 and pre10. The important
difference is that in pre2 init.c is using a SIGCHLD handler to handle child
termination, while in pre10, it just uses an infinite loop in main, with a
sleep(1) inside.

In my case, I have a single executable that I want to be run, so, instead of
building an inittab, I let init.c use the default table and place my
executable in /etc/init/rcS. This indeed means that rcS never finishes.
Since pre10 init.c *first* executes SYSINIT actions, and then enters the
infinite loop in which zombies are reaped, this loop is never reached and
zombies are not reaped.

While I understand my approach is not the most correct one, I feel that
SYSINIT processes not finishing should not interfer with the task of zombie
process reaping, so I suggest init.c is reverted to the SIGCHLD approach.

I'd really like to get some feedback on this matter from the busybox init.c
writers/maintainers.

Regards.

Nacho.



More information about the busybox mailing list