首页 > 系统服务 > 详细

[Linux笔记]杀死僵尸程序

时间:2016-01-11 15:11:47      阅读:237      评论:0      收藏:0      [点我收藏+]

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笔记]杀死僵尸程序

原文:http://www.cnblogs.com/imagezy/p/5121279.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!