From: Logan Shaw ([email protected])
Subject: Re: How to Kill <defunct> process
Newsgroups: comp.unix.admin
Date: 1994-11-28 23:08:32 PST

In article <[email protected]>, Tariq Amin <[email protected]> wrote:
> How can I kill a defunct process in solaris 2.3. I tried kill -9 but it
> does not work. Any clues?

(I know this is a FAQ, but just so not everybody has to go to the trouble of answering...)

You cannot kill a defunct process. A defunct (or "zombie") process is a process that isn't running, isn't eligible to run, and takes up no system resources. It's actually a process that has exited, but its parent has not called wait() in order to find out its exit status. The kernel will keep the zombie process around until the parent makes calls wait().

There are no adverse effects from having a defunct process around, other than the fact it takes up a miniscule amount of space in some kernel data structures somewhere and the fact it reminds you that you have some less than ideal software somewhere.

(You might use something like 'ps -deafl' to find the parent of the defunct process -- look under the PPID field. If you can somehow make the parent process call wait(), or if you kill it, the defunct process should go away.)

Hope that helps...

Adios,
Logan
--
Logan Shaw, Unix System Administrator
"Everything is a struggle in Unix" -Dave Keenan