SIGINT, SIGHUP, SIGQUIT, SIGTERM,
/* Signals that cause a no-op:
* - SIGPIPE might happen with sockets and would crash VLC. It MUST be
- * blocked by any LibVLC-dependent application, in addition to VLC.
- * - SIGCHLD is comes after exec*() (such as httpd CGI support) and must
+ * blocked by any LibVLC-dependent application, not just VLC.
+ * - SIGCHLD comes after exec*() (such as httpd CGI support) and must
* be dequeued to cleanup zombie processes.
*/
SIGPIPE, SIGCHLD
/* 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++)
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);