标签:
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. (After the parent dies, the zombie will be inherited by init
, which will wait on it and clear its entry in the process table.) If your daemon is spawning children that become zombies, you have a bug. Your daemon should notice when its children die and wait
on them to determine their exit status.
Example command:
kill $(ps -A -ostat,ppid | awk ‘/[zZ]/{print $2}‘)
标签:
原文地址:http://www.cnblogs.com/imagezy/p/5121279.html