【发布时间】:2013-06-01 10:42:06
【问题描述】:
我在前台启动了我的程序(一个守护程序),然后我用kill -9 杀死了它,但是我得到了一个僵尸,我无法用kill -9 杀死它。如何杀死僵尸进程?
如果僵尸是一个死进程(已经被杀死),我如何从ps aux的输出中删除它?
root@OpenWrt:~# anyprogramd &
root@OpenWrt:~# ps aux | grep anyprogram
1163 root 2552 S anyprogramd
1167 root 2552 S anyprogramd
1169 root 2552 S anyprogramd
1170 root 2552 S anyprogramd
10101 root 944 S grep anyprogram
root@OpenWrt:~# pidof anyprogramd
1170 1169 1167 1163
root@OpenWrt:~# kill -9 1170 1169 1167 1163
root@OpenWrt:~# ps aux |grep anyprogram
1163 root 0 Z [anyprogramd]
root@OpenWrt:~# kill -9 1163
root@OpenWrt:~# ps aux |grep anyprogram
1163 root 0 Z [anyprogramd]
【问题讨论】:
-
ps -o ppid 1163说什么?也就是说,1163的父母是谁?这是必须终止的进程。
标签: linux shell ubuntu debian zombie-process