Have you ever been in the situation of getting on your nerves because you can’t kill a process ??
I did not :P But I was just wondering how to get rid of them.
I’ll teach you how to do it in this tip!
First of all. Do you know what is a defunct process?
Under Unix, we call those kind of processes: Zombies.
We call them zombies because they are already dead processes, so we can’t kill them.
Note that zombies are not really processes. They are just entries inside the processes’ table, that has not been cleaned up.
This happens when a parent process did not wait for his child to exit.
To get rid of them, you can just find the process parent of that process, kill it so that the Zombie gets a new parent, which happens to be init, and the latter will clean up its entry in the processes’ table.
To find out those defunct process with their parent PID, use:
Then you can use the PPID of the process to check all its children by using:
If you don’t see any processes which you might want to tinker with, you can just kill the parent:
Finished! Comments are welcome ;)