码迷,mamicode.com
首页 > 系统相关 > 详细

[Linux笔记]杀死僵尸程序

时间:2016-01-11 15:14:01      阅读:251      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!