Commit 47e1d944 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Ignore signal/sigaction on blocked signals

It is a bad idea, but it does not really harm.
parent 3725a9ef
...@@ -216,7 +216,8 @@ void (*signal (int signum, void (*handler) (int))) (int) ...@@ -216,7 +216,8 @@ void (*signal (int signum, void (*handler) (int))) (int)
if (!blocked_signal (signum)) if (!blocked_signal (signum))
goto error; goto error;
/* For our blocked signals, the handler won't matter much... */ /* For our blocked signals, the handler won't matter much... */
LOG("Warning", "%d, %p", signum, handler); if (handler == SIG_DFL)
LOG("Warning", "%d, SIG_DFL", signum, handler);
} }
return CALL(signal, signum, handler); return CALL(signal, signum, handler);
error: error:
...@@ -231,7 +232,8 @@ int sigaction (int signum, const struct sigaction *act, struct sigaction *old) ...@@ -231,7 +232,8 @@ int sigaction (int signum, const struct sigaction *act, struct sigaction *old)
if ((act->sa_flags & SA_SIGINFO) if ((act->sa_flags & SA_SIGINFO)
|| (act->sa_handler != SIG_IGN && act->sa_handler != SIG_DFL)) || (act->sa_handler != SIG_IGN && act->sa_handler != SIG_DFL))
goto error; goto error;
LOG("Warning", "%d, %p, %p", signum, act, old); if (act->sa_handler == SIG_DFL)
LOG("Warning", "%d, %p, SIG_DFL", signum, act);
} }
return CALL(sigaction, signum, act, old); return CALL(sigaction, signum, act, old);
error: error:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment