]> git.sesse.net Git - vlc/commitdiff
Ignore signal/sigaction on blocked signals
authorRémi Denis-Courmont <remi@remlab.net>
Sun, 18 Apr 2010 13:42:34 +0000 (16:42 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Sun, 18 Apr 2010 13:45:10 +0000 (16:45 +0300)
It is a bad idea, but it does not really harm.

bin/override.c

index 5996e43c499b44067a2b67b8d4cdbf1840062dc1..f3eebae5a069ad596a87737bc751750a7b42f9d5 100644 (file)
@@ -216,7 +216,8 @@ void (*signal (int signum, void (*handler) (int))) (int)
         if (!blocked_signal (signum))
             goto error;
         /* 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);
 error:
@@ -231,7 +232,8 @@ int sigaction (int signum, const struct sigaction *act, struct sigaction *old)
         if ((act->sa_flags & SA_SIGINFO)
          || (act->sa_handler != SIG_IGN && act->sa_handler != SIG_DFL))
             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);
 error: