help needed with froked process becoming zombies

Siddhesh Poyarekar siddhesh.poyarekar@gmail.com
Mon Aug 27 08:59:00 GMT 2012


On 27 August 2012 06:48, Christoph Anton Mitterer <calestyo@scientia.net> wrote:
>> The alternative is to ignore
>> SIGCHLD in the parent and then the kernel knows it should not keep the
>> child around and should reap the child on exit (not leaving a zombie).
> I tried that,... added a:
> signal(SIGCHILD, SIG_IGN);
> to the default: case of the switch... no change.

I don't think you can do that. For the kernel to not signal the
parent, the signal needs to be removed from the underlying clone
system call and that can only be done if you're calling clone
directly, not via fork.

> Maybe Nagios/Icinga don't wait for ssh(command)/parent-forker.c ... and
> that's why it becomes a zombie.

Yes, there must be some code path where nagios/icinga fails to call
wait() on the exiting ssh process.


-- 
http://siddhesh.in



More information about the Libc-help mailing list