当前位置: 技术问答>linux和unix
HP unix下kill -9 杀不掉进程
来源: 互联网 发布时间:2016-09-13
本文导语: 杀掉父进程也不行。 有人说这是HP的bug,也没找到具体的证据说明。 哪位大牛知道这个问题怎么解决,万分感谢。 | 找到答案啦 One of the early things people learn about Unix is that a "kill -9" ...
杀掉父进程也不行。
有人说这是HP的bug,也没找到具体的证据说明。
哪位大牛知道这个问题怎么解决,万分感谢。
有人说这是HP的bug,也没找到具体的证据说明。
哪位大牛知道这个问题怎么解决,万分感谢。
|
找到答案啦
One of the early things people learn about Unix is that a "kill -9" is invincible- that a process must die if you send it a KILL (-9). However, that's not entirely true:
* A process can be sleeping in kernel code. Usually that's because of faulty hardware or a badly written driver- or maybe a little of both. A device that isn't set to the interrupt the driver thinks it is can cause this, for example- the driver is waiting for something its never going to get. The process doesn't ignore your signal- it just never gets it.
* A zombie process doesn't react to signals because it's not really a process at all- it's just what's left over after it died. What's supposed to happen is that its parent process was to issue a "wait()" to collect the information about its exit. If the parent doesn't (programming error or just bad programming), you get a zombie. The zombie will go away if its parent dies- it will be "adopted" by init which will do the wait()- so if you see one hanging about, check its parent; if it is init, it will be gone soon, if not the only recourse is to kill the parent..which you may or may not want to do.
* Finally, a process that is being traced (by a debugger, for example) won't react to the KILL either.
http://sites.google.com/site/zgzqit/generalit/ruherangkill-9shabudiaonidejincheng
One of the early things people learn about Unix is that a "kill -9" is invincible- that a process must die if you send it a KILL (-9). However, that's not entirely true:
* A process can be sleeping in kernel code. Usually that's because of faulty hardware or a badly written driver- or maybe a little of both. A device that isn't set to the interrupt the driver thinks it is can cause this, for example- the driver is waiting for something its never going to get. The process doesn't ignore your signal- it just never gets it.
* A zombie process doesn't react to signals because it's not really a process at all- it's just what's left over after it died. What's supposed to happen is that its parent process was to issue a "wait()" to collect the information about its exit. If the parent doesn't (programming error or just bad programming), you get a zombie. The zombie will go away if its parent dies- it will be "adopted" by init which will do the wait()- so if you see one hanging about, check its parent; if it is init, it will be gone soon, if not the only recourse is to kill the parent..which you may or may not want to do.
* Finally, a process that is being traced (by a debugger, for example) won't react to the KILL either.
http://sites.google.com/site/zgzqit/generalit/ruherangkill-9shabudiaonidejincheng
|
是不是有别的进程再监视这个进程,没了就会再建立哦,呵呵