Tough nuts for "kill -9" (was Re: [vox-tech] ac97 sound problems)

vox-tech@lists.lugod.org vox-tech@lists.lugod.org
Thu, 25 Apr 2002 15:53:30 -0400


On Thu, Apr 25, 2002 at 12:36:02PM -0700, Jeff Newmiller wrote:
> On Thu, 25 Apr 2002, Peter Jay Salzman wrote:
> > begin msimons@moria.simons-clan.com <msimons@moria.simons-clan.com> 
> > >   If you send a "kill -9" and the process does not die instantly, then 
> > > you have a kernel bug... there is no way to "block" or "hide" from 
> > > kill -9.
> 
> The process may also be a zombie... this has been discussed on this list
> and is a Unix FAQ ...

  Heh, zombie "processes" are already dead, which is why they can not be
killed.  On Linux all of their resources are released and they only occupy a 
few pages of memory for process state and return code, until their parent
calls wait on them (which "buries" them).

  It's true that you can send them -9 and they will still appear in ps.

    Later,
      Mike

... in another bold statement all processes become zombies just after
they exit.  unless _maybe_ you are on a SMP machine... except maybe
init, and all those those pesky kernel threads...  ;)

(I'm actually not certain of implementation, it could be that the kernel
may suspend the process that exits, before cleaning up after it and flaging 
it as a Z state, to signal the parent... but that seems messy.)