The sigaction() function shall fail if:
EINVAL
The sig argument is not a valid signal number or an
attempt is made to catch a signal that cannot be caught or
ignore a signal that cannot be ignored.
The sigaction() function may fail if:
EINVAL
An attempt was made to set the action to SIG_DFL for a
signal that cannot be caught or ignored (or both).
In addition, on systems that do not support the XSI option, the
sigaction() function may fail if the SA_SIGINFO flag is set in
the sa_flags field of the sigaction
structure for a signal not in
the range SIGRTMIN to SIGRTMAX.
The following sections are informative.