Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'How to kill a Zombie?' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
How to kill a Zombie?
Authored by: patrickoehlinger on Dec 05, '02 02:18:55PM
It happend to me that a App (owned by root) stopped in Zombie mode (Process Viewer sad so).
In the Terminal I tried kill PID_of_Zombie_App but OS X complained that it didn't found the PID, I even tried it with sudo. But no chance, I had to restart :-( my system to get ride of the Zombie.


Any idea what I could do next time?

[ Reply to This | # ]

How to kill a Zombie?
Authored by: brandonedling on Dec 05, '02 03:37:52PM

My understanding is that a zombie is like a child process... it's spawned by another running process. I might very well be wrong, though...



[ Reply to This | # ]
How to kill a Zombie?
Authored by: a1291762 on Dec 05, '02 05:05:07PM

Zombies are generally caused by bad programming :)

I think that a restart is the only way to get rid of them.

They turned up a lot on the Unix machine at Uni where all the C students were writing code :)



[ Reply to This | # ]
How to kill a Zombie?
Authored by: babbage on Dec 06, '02 05:42:40PM

I forget the exact definition at the moment, but basically a zombie process is one that is stuck in a situation where it is waiting for some kind of system event or input. So for example if you have a login shell and kill the window, maybe your shell process could end up being a zombie if it's waiting for user input that will never come.

The bad thing is that, as another commenter noted, these are usually the result of shoddy programming, & because the zombie is waiting for some specific event [which will never occur at this point] you can't kill it because the program is blocked on waiting for that other input. Bummer.

On the other hand, a program in this state consumes almost no system resources, so it's not that bad. They consume almost no ram, by definition they consume no CPU time, etc. So yeah, if you want to kill them off you have to reboot, but they're more annoying than harmful -- if you want you can just leave them around until the next time you would have had to reboot anyway.



[ Reply to This | # ]
How to kill a Zombie?
Authored by: sjmadsen on Dec 07, '02 02:11:27PM
This page gives an explanation of a zombie process. In a nutshell, a zombie is a child process whose parent hasn't come along to pick up its exit code. The zombie only consumes an entry in the process table; it doesn't use up any memory or other system resources and does not use any CPU. When the parent exits, the zombies should go away as well, but if not, a reboot is the only way to clean them up. The previous posters are correct that zombies are caused by poor programming, but to say the processes are waiting on an event is not quite right.

[ Reply to This | # ]
How to kill a Zombie?
Authored by: Lanir on Dec 14, '02 06:28:47AM
I don't have a zombie process to try this on. But... here's the deal. Kill has several flags you can use. I just explained this earlier, but just in case... The most commonly useful of these are like so:

kill -HUP # Used to hangup. Does not necessarily stop the program from
# running. Very useful to tell a daemon process to look at
# it's config file again.

kill # No flags. Just tells it to clean up it's stuff and leave.
# Analogous to an eviction notice.

kill -KILL # Tells the system to actively kill it, not just politely
# tell it to leave. Analogous to the eviction notice above,
# combined with "... and I'll be back in a minute with my
# shotgun so you better be gone!"

kill 1 # Go into single user mode without rebooting. The system
# should start up again right after you type exit in
# the shell. Basically keeps the system stuff intact while
# cleaning house on all user processes. Should disable
# networking as well but I haven't checked.

[ Reply to This | # ]