]> git.sesse.net Git - vlc/blobdiff - bin/vlc.c
Don't use repeat the same adverb twice
[vlc] / bin / vlc.c
index 46eba46caf560cbe1a369bcb33c4e5118f17f8d5..ba3b040a8fc5c31f6fe097993a090bc90b58b5ac 100644 (file)
--- a/bin/vlc.c
+++ b/bin/vlc.c
@@ -56,7 +56,7 @@ int main( int i_argc, const char *ppsz_argv[] )
     {
         fprintf (stderr, "VLC is not supposed to be run as root. Sorry.\n"
         "If you need to use real-time priorities and/or privileged TCP ports\n"
-        "you can use %s-wrapper (make sure it is Set-UID root first and\n"
+        "you can use %s-wrapper (make sure it is Set-UID root and\n"
         "cannot be run by non-trusted users first).\n", ppsz_argv[0]);
         return 1;
     }
@@ -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);