While ac61ed310de1 ("Fix handling of SA_RESETHAND and SA_NODEFER") made
SA_RESETHAND follow Posix in not resetting the handler to SIG_DFL, Linux
does reset it and thus applications do expect it to be reset. It is indeed
convenient for them to print a backtrace and let SIGILL then take actual
effect.
---
hurd/hurdsig.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/hurd/hurdsig.c b/hurd/hurdsig.c
index dda7540bae..38e2e4c9ac 100644
--- a/hurd/hurdsig.c
+++ b/hurd/hurdsig.c
@@ -1149,11 +1149,11 @@ post_signal (struct hurd_sigstate *ss,
if (! (action->sa_flags & (SA_RESETHAND | SA_NODEFER)))
__sigaddset (&ss->blocked, signo);
- /* Reset to SIG_DFL if requested. SIGILL and SIGTRAP cannot
- be automatically reset when delivered; the system silently
- enforces this restriction. */
- if (action->sa_flags & SA_RESETHAND
- && signo != SIGILL && signo != SIGTRAP)
+ /* Reset to SIG_DFL if requested.
+ While Posix says that "SIGILL and SIGTRAP cannot be automatically
+ reset when delivered; the system silently enforces this restriction",
+ in practice applications expect them to be. */
+ if (action->sa_flags & SA_RESETHAND)
action->sa_handler = SIG_DFL;
/* Any sigsuspend call must return after the handler does. */
--
2.53.0