On Fri, 2007-05-18 at 13:17 -0500, Michael Yep wrote: > Ed Greshko wrote: > > Mike McCarty wrote: > >> Ed Greshko wrote: > >>> Simon Slater wrote: > >>> > >>>> A quick question for someone: a process running as root can't be > >>>> killed > >>>> by kill PID. How do I kill it? > >>> > >>> Do a "ps PID".... If the STAT shows "Z" it means the process is a > >>> zombie. > >>> And, as we all know, you can't kill a zombie. :-) > >> That's because it's already dead. Just nowhere to send > >> the death signal. > > > > I wouldn't quite say it that way. There is a place to send the signal, the > > PID, it is just that the process isn't listening. It is waiting on something. > > > So I'm curious now, if the kernel know the process is zombie, why doesnt > it deallocate it, or remove it from the ps list? Because the kernel can't know if the parent process never intends to call waitpid(). (The zombie exists so that the parent can retrieve the exit status from the process.)