On Tue, 11 Nov 2003, Brian Baquiran wrote:
> Pong wrote:
> > On Tue, 11 Nov 2003, Ariz Jacinto wrote:
> >
> >>>>how to kill zombie processes w/o rebooting?
> >>>trace it's parent process and kill it?
> >>tried it before but it wasnt enough.
> > trace upto the super parent process surely being one level below 'init'.
>
> Er, you mean the kernel? Of course rebooting would clear out the process table.
>
> init IS the first process started by the kernel. Everything else is started by init.
>
hi, i didnt mean the kernel obviously,
but the top parent process directly under 'init'.
a graphic example is in order. consider the
inverted process tree rooted at init with PID=1:
init(1)-+-superparent(2)-+-zombie(3)
|
+-superparent(4)-+-subparent(5)---zombie(6)
so when i mean, superparent (obviously a word i invented for
this thread), it's the topmost parent nearest to 'init'.
or in other words, one branch/level below init.
so to erase zombie(3), you must kill superparent(2).
to *surely* erase zombie(6), you must kill superparent(4) first
and then subparent(5) next so on and so forth.
after killing the superparents/subparents,
this is the process hierarchy in a few nanoseconds:
init(1)-+-zombie(3)
|
+-zombie(6)
and by the time the nanosecond is up, 'init' would have
woken up and called the wait() cleanup procedure for each zombie
directly under it. now *that* cleans up the zombies
*without* rebooting.
so if you think about it for a moment, all processes who terminate
*transition* to the zombie state for a short time until their parent
cleans them up via wait() call. the parent failing to call wait() on
their dead child processes produces zombies. that failure is a parent bug.
pong
--
Philippine Linux Users' Group (PLUG) Mailing List
[EMAIL PROTECTED] (#PLUG @ irc.free.net.ph)
Official Website: http://plug.linux.org.ph
Searchable Archives: http://marc.free.net.ph
.
To leave, go to http://lists.q-linux.com/mailman/listinfo/plug
.
Are you a Linux newbie? To join the newbie list, go to
http://lists.q-linux.com/mailman/listinfo/ph-linux-newbie