4

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 ...?

GAD3R
69.8k32 gold badges147 silver badges216 bronze badges
asked Dec 24, 2018 at 20:31

1 Answer 1

10

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).

answered Dec 24, 2018 at 22:39
5
  • 1
    I assume SIGKILL is a fatal signal, but which other signals could be considered as such? Commented Dec 24, 2018 at 22:54
  • Thanks. (1) "the ignored signals (from the kernel’s perspective)". Most signals can be ignored. But the first link you gave shows some specific signals, such as SIGCONT, SIGCHLD, SIGWINCH, and SIGURG. So what does "ignored" signal mean? (2) The first link you gave doesn't say anything like "a fatal signal is one which would result in the process being killed (without going through a handler specified by the program being run)". Can we derive that from the definition in the first quote? Commented Dec 25, 2018 at 6:03
  • @nxnev any signal not listed as an ignored or stop signal is fatal by default. Commented Dec 25, 2018 at 8:35
  • (1) It means that the kernel ignores them in this context, not that they’re configured as ignored signals. (Note that the list is static.) (2) The two bullet points retranscribe the code definition; that’s how we can derive the meaning of "fatal signal". Commented Dec 25, 2018 at 8:37
  • Thanks. Fatal signals are defined in terms of default actions, and by set complement (not ignore, not stop or contonue, then only terminate and core) Commented Dec 25, 2018 at 19:05

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.