This question already has an answer here:

This is how I think Linux signals work:

Each process have a default signal handler for each signal, some signals's default signal handler terminates the process, while other signals's default signal handler simply ignores the signal, etc.

The following table shows all the actions that a default signal handler can take (this table is from this documentation):

Term Default action is to terminate the process.

Ign Default action is to ignore the signal.

Core Default action is to terminate the process and dump core (see core(5)).

Stop Default action is to stop the process.

Cont Default action is to continue the process if it is currently stopped.

You can override the default signal handler with your own signal handler by using signal() (which I think is deprecated) or sigaction().

Am I correct so far?

Now my question is: Are there some signals that you cannot override their default signal handler?

marked as duplicate by Stephen Kitt linux Nov 22 '17 at 9:12

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


Both man pages you linked to mention the signals whose handlers can’t be overridden. In signal(2):

The signals SIGKILL and SIGSTOP cannot be caught or ignored.

In sigaction(2):

signum specifies the signal and can be any valid signal except SIGKILL and SIGSTOP.

Not the answer you're looking for? Browse other questions tagged or ask your own question.