cases in which SIGKILL will not work

ぐ巨炮叔叔 提交于 2019-12-13 13:20:11

问题


Are there any cases where an application running on linux, which has not blocked signal SIGKILL, will not get killed on firing SIGKILL signal ?


回答1:


SIGKILL cannot be blocked or ignored (SIGSTOP can't either).

A process can become unresponsive to the signal if it is blocked "inside" a system call (waiting on I/O is one example - waiting on I/O on a failed NFS filesystem that is hard-mounted without the intr option for example).

(Another side case is zombie processes, but they're not really processes at that point.)




回答2:


Yes, when the process is blocked in kernel space, e.g. reading on a blocked NFS file system, or on a device which does not respond.




回答3:


Check with ps a (or you can use other flags as well) the process state. If a process state is

D : uninterruptible sleep (usually IO)

then you cannot kill that process.
As others mentioned, and as it is defined, this is usually caused by a stuck I/O, for example process waiting to do I/O to a disconnected NFS file system.



来源:https://stackoverflow.com/questions/8600430/cases-in-which-sigkill-will-not-work

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!