[techtalk] killing processes on dead pts/n 's

Anmol Khirbat anmol at teknema.com
Wed Feb 28 10:44:36 EST 2001


On Wed, 28 Feb 2001, David Merrill wrote:

> Greetings,
> 
> I access my linux box from work with PuTTY, and occasionally I lose my
> connection. When this happens, I wind up with a process (mutt usually,
> or vi) that is still running, that I sometimes cannot kill using
> "kill", or with top. 

You won't be able to kill this process if it's a zombie process. If you
see <defunct> against any process in a `ps ax' listing, then it's a
zombie. A process becomes a zombie when it has exited but its parent
process hasn't fetched its termination status. A zombie process is "dead",
but it hangs around and hogs resources.

To get rid of a zombie, you need to kill its parent process. Once the
parent process is out of the way, the zombie process will be inherited by
init (pid 1) and init will clear it up, thus reclaiming all the resources
held by the zombie.

To figure out the PPIDs, try `ps xj' or `pstree -p'. 

HTH

bye :)
Anmol






More information about the Techtalk mailing list