This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: help needed with froked process becoming zombies
On Sun, Aug 26, 2012 at 11:58 PM, Siddhesh Poyarekar
<siddhesh.poyarekar@gmail.com> wrote:
> 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.
I'd argue that's a kernel bug.
>> 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.
Exactly.
Cheers,
Carlos.