[vlc-devel] commit: Unblock death signals if signals interface is absent ( Rémi Denis-Courmont )

git version control git at videolan.org
Thu Sep 25 17:31:52 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Thu Sep 25 18:34:13 2008 +0300| [723e71ef9826934c5dae97507604da55f0e9aed3] | committer: Rémi Denis-Courmont 

Unblock death signals if signals interface is absent

By the way, the exception handler claims the exception is not handled!

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

 bin/vlc.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/bin/vlc.c b/bin/vlc.c
index 46eba46..f2d820f 100644
--- a/bin/vlc.c
+++ b/bin/vlc.c
@@ -116,6 +116,8 @@ int main( int i_argc, const char *ppsz_argv[] )
 
     /* Block all these signals */
     pthread_sigmask (SIG_BLOCK, &set, NULL);
+    sigdelset (&set, SIGPIPE);
+    sigdelset (&set, SIGCHLD);
 
     /* Note that FromLocale() can be used before libvlc is initialized */
     for (int i = 0; i < i_argc; i++)
@@ -133,7 +135,12 @@ int main( int i_argc, const char *ppsz_argv[] )
 
     if (vlc != NULL)
     {
-        libvlc_add_intf (vlc, "signals", &dummy);
+        libvlc_add_intf (vlc, "signals", &ex);
+        if (libvlc_exception_raised (&ex))
+        {
+            libvlc_exception_clear (&ex);
+            pthread_sigmask (SIG_UNBLOCK, &set, NULL);
+        }
         libvlc_add_intf (vlc, NULL, &ex);
         libvlc_playlist_play (vlc, -1, 0, NULL, &dummy);
         libvlc_wait (vlc);




More information about the vlc-devel mailing list