[vlc-commits] commit: Ignore signal/sigaction on blocked signals ( Rémi Denis-Courmont )

git at videolan.org git at videolan.org
Sun Apr 18 15:45:19 CEST 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Apr 18 16:42:34 2010 +0300| [47e1d944ba1e27a2bf85e5ab083f99418bb22dc9] | committer: Rémi Denis-Courmont 

Ignore signal/sigaction on blocked signals

It is a bad idea, but it does not really harm.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=47e1d944ba1e27a2bf85e5ab083f99418bb22dc9
---

 bin/override.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/bin/override.c b/bin/override.c
index 5996e43..f3eebae 100644
--- a/bin/override.c
+++ b/bin/override.c
@@ -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:



More information about the vlc-commits mailing list