For all those Dungeons and Dragons fans who also love Macintosh Computers, I feel it is my duty to warn you about zombie processes that are running rampant through your operating system! Why, you ask, why do they exist? Their only purpose is to tell their parent process that they have died! Thus, the zombie process cannot be kill(1)ed, not even kill -9ed!!! The only way to get rid of a zombie is – gasp! – to kill(1) its parent! Does that seem harsh? — well, if the parent process would just wait(2) once in a while, it would pick up on those not-so-subtle SIGNALs (SIGCHLD — roughly translated from computerese means “Hey, ma, your kid is dead”). But no, our zombie’s parent is too busy to wait(2)… we’ll have no choice but to kill the unattentive parent. Then our zombie will be adopted by init, the parent of all lost processes. Init is always wait(2)ing to hear of the demise of its children (init is kind of a worry wart, I guess) So finally our zombie will be at rest.
The moral of the story : Zombies can’t be killed. They just want love, and if you stop and listen they will be at rest. If you see a zombie, and its parent isn’t listening to it, you can just go ahead and kill the parent.
I have to admit, sometimes your operating system will be overrun by zombies. Then you can’t start any more processes, not even kill(1). Basically at this point you are screwed. You can try sacrificing some healthy processes to free up a few PIDs, but ultimately you may just have to reboot.
Categories