【Linux命令】杀死僵尸程序

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}')

  

上一篇:Linux 新手常用命令


下一篇:Android Studio上方便使用butterknife注解框架的偷懒插件Android Butterknife Zelezny