Linux – a fatal signal

linuxsignals

The Linux Programming Interface says:

TASK_KILLABLE : This state is like TASK_UNINTERRUPTIBLE , but wakes the process if a fatal signal (i.e., one that would kill the process) is received. By converting relevant parts of the kernel code to use this state, various scenarios where a hung process requires a system restart can be avoided. Instead, the process can be killed by sending it a fatal signal. The first piece of kernel code to be converted to use TASK_KILLABLE was NFS.

A fatal signal can wake up a process in TASK_KILLABLE but not in TASK_UNINTERRUPTIBLE.

Does a fatal signal mean only SIGKILL, or also SIGTERM, SIGHUP, SIGQUIT, SIGINT, or …?

Best Answer

Most signals are fatal by default. Any signal listed with a default action of “terminate” or “dump core” is fatal, unless it’s ignored or handled explicitly. This includes such “benign” signals as SIGUSR1, as well as SIGKILL of course, SIGTERM etc.

This matches the Linux kernel’s definition of fatal signals; for a signal to be fatal:

Thus a fatal signal is one which would result in the process being killed (without going through a handler specified by the program being run).

Related Question