lkml.org 
[lkml]   [2004]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: is killing zombies possible w/o a reboot?
    Hi Bill :)

* Bill Davidsen <davidsen@tmr.com> dixit:
> > I think that the parent (which is whatever process did the fork
> >when you clicked your mouse) is still alive and forgetting to do the
> >'wait()' for its children.
> It would be good to know what the PPID is, from ps or similar. Things
> from X are a pain, the parent is often something you don't want to kill.
> Sometimes you can reparent from command line, "bash -c foo&" or similar,
> so the parent can be killed without logging out.

Just use ps to reveal the family tree. Is not that hard ;)

> I would swear that the parent *is* init in some cases, which is puzzling
> since they should be reaped.

But that's OK :))) When a parent dies without waiting for its
children, the zombies are reparented to init. That's correct. Then
init will wait for them. The problem is that sometimes the signals
doesn't arrive or the like. Then the zombies are laying around a bit,
until a timer in 'init' reaps them. That's correct too: init can only
wait for children when it receives SIGCHLD or periodically, using a
timer. I've written a init program and that's the way I do it, just
in case some signal gets lost.

If init is the parent, all works ok, just wait a bit and all
those zombies will really die ;)

Raúl Núñez de Arenas Coronado

--
Linux Registered User 88736
http://www.dervishd.net & http://www.pleyades.net/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:07    [from the cache]
©2003-2011 Jasper Spaans