When kill command is issued to a process, by default SIGTERM(15) signal is called. In case if the process does not terminate, we issue kill -9 (SIGKILL)
SIGTERM can be blocked, handled or ignored by the process, but SIGKILL cannot be handled or ignored by the process.
Upon receiving a SIGTERM, the process shall either stop after cleaning up resources or can ignore the signal and keep running indefinitely. However, in case of SIGKILL, the process cannot handle or ignore this signal as it will never receive this signal - the signal goes straight to the kernel init which in turn will stop the process.
SIGTERM can be blocked, handled or ignored by the process, but SIGKILL cannot be handled or ignored by the process.
Upon receiving a SIGTERM, the process shall either stop after cleaning up resources or can ignore the signal and keep running indefinitely. However, in case of SIGKILL, the process cannot handle or ignore this signal as it will never receive this signal - the signal goes straight to the kernel init which in turn will stop the process.
No comments:
Post a Comment