kill zombies

By: | Comments: No Comments

Posted in categories: Computer Tips, Work related

A zombie is already dead, so you cannot kill it. To clean up a zombie, it must be waited on by its parent, so killing the parent should work to eliminate the zombie.

An example of how you might send a signal to every process that is the parent of a zombie (note that this is extremely crude and might kill processes that you do not intend. I do not recommend using this sort of sledge hammer):

kill $(ps -A -ostat,ppid | awk ‘/[zZ]/ && !a[$2]++ {print $2}’)

Be the first to comment!

Leave a Reply