[BusyBox] init does not kill reparented processes

Ignacio García Pérez iggarpe at terra.es
Thu Aug 26 14:53:57 UTC 2004


Hi,

I've recently set up a lightly modified version of the standard rshd server
that comes with Red Hat 9, and I've noticed that each remotely executed
process leaves a zombie process in the remote machine:

  209 root            Z   [sh]
  217 root            Z   [sh]
  221 root            Z   [sh]
  226 root            Z   [sh]

I'm using busybox-1.00-pre10, but have checked and the problem also appears
with busybox-1.00-rc3.

As far as I know, this happens because when a process dies, all its sons are
reparented to process 1, which is usually init, and whose task, among
others, is reaping these zombie processes.

So, for some unknown reason, init is not doing its job.

I've tried to modify init/init.c sources and create a SIGCHLD handler
function and just waits for zombie processes and then reaps them, and this
solves the problem, though it is probably not the right solution since it is
intefering with the init_main loop that is supposed to to the zombien
reaping, respawning, etc.

Does anyone know why unmodified init/init.c does not do its reaping job
properly?.

Thanks.

Nacho.




More information about the busybox mailing list