I know that in most cases, it is impossible to ignore all signals. If it was possible for an application to ignore all signals, how would you stop it? Since you wouldn't be able to use SIGKILL or SIGSTOP...Not even sure if this question makes sense...
CodePudding user response:
SIGKILL will end the process without it having any say in the matter.
When SIGKILL is send to a process, the kernel will not relay the signal to the process and call a signal handler it specified. Instead the kernel will simply immediately stop and destroy the process.
So, SIGKILL will always work. There is nothing the process can do to prevent it. It won't get any time to execute any code or do any cleanup. This is why you would usually try to send a SIGTERM first to ask the process to come to an end on its own and follow with a SIGKILL after a while only if the process didn't honor the SIGTERM request.
For SIGSTOP the matter is similar.