Even though resetting SIGKILL or SIGSTOP to SIG_DFL would be a noop it
isn't allowed. Just always return EINVAL if an attempt is made to set
the signal handler for SIGKILL or SIGSTOP. There is an LTP test for
this signal01.
https://bugs.kde.org/show_bug.cgi?id=506930
502968 Wrap linux specific syscalls 457 (listmount) and 458 (statmount)
506499 Unhandled syscall 592 (exterrctl - FreeBSD
506795 Better report which clone flags are problematic
+506930 valgrind allows SIGKILL being reset to SIG_DFL
To see details of a given bug, visit
https://bugs.kde.org/show_bug.cgi?id=XXXXXX
|| new_act->ksa_handler == VKI_SIG_IGN) )
goto bad_signo_reserved;
- /* Reject attempts to set a handler (or set ignore) for SIGKILL. */
- if ( (signo == VKI_SIGKILL || signo == VKI_SIGSTOP)
- && new_act
- && new_act->ksa_handler != VKI_SIG_DFL)
+ /* Reject any attempt to set the handler for SIGKILL/STOP. */
+ if ( (signo == VKI_SIGKILL || signo == VKI_SIGSTOP) && new_act )
goto bad_sigkill_or_sigstop;
/* If the client supplied non-NULL old_act, copy the relevant SCSS