Re: is killing zombies possible w/o a reboot?

From: DervishD
Date: Thu Nov 04 2004 - 05:22:47 EST


Hi Bill :)

* Bill Davidsen <davidsen@xxxxxxx> dixit:
> > Or write a little program that just 'wait()'s for the specified
> >PID's. That is perfectly portable IMHO. But I must admit that the
> >preferred way should be killing the parent. 'init' will reap the
> >children after that.
> You can't wait() for the process, you have to use waitfor(), and the
> last time I tried that it didn't work, although I don't remember the
> symptom beyond that.

You can't wait for other's children. OTOH, if we talk about your
children, you can do wait() or waitpid() (I assume that you referred
to waitpid(), since there isn't waitfor() AFAIK). The only difference
is that wait suspends the process until information from a child is
available.

If you are talking about others' children, then your call to
waitpid() (or wait()) failed with ECHILD: not your child.

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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/