From 723e71ef9826934c5dae97507604da55f0e9aed3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Thu, 25 Sep 2008 18:34:13 +0300 Subject: [PATCH] Unblock death signals if signals interface is absent By the way, the exception handler claims the exception is not handled! --- bin/vlc.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bin/vlc.c b/bin/vlc.c index 46eba46caf..f2d820f83c 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); -- 2.39.2