]> git.sesse.net Git - vlc/commitdiff
Force SIGCHLD to default handler
authorRémi Denis-Courmont <remi@remlab.net>
Thu, 27 May 2010 15:46:47 +0000 (18:46 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Thu, 27 May 2010 15:48:21 +0000 (18:48 +0300)
... so that waitpid() works even if our parent process ignores SIGCHLD
(SIG_IGN is preserved across exec*()).

bin/vlc.c

index 0f7218e632afd1568a14062fa97a7109b477ed32..a77142419460a97040115ff2be5217960f9dc3d6 100644 (file)
--- a/bin/vlc.c
+++ b/bin/vlc.c
@@ -68,6 +68,8 @@ int main( int i_argc, const char *ppsz_argv[] )
      * Note: this is NOT an excuse for not protecting against SIGPIPE. If
      * LibVLC runs outside of VLC, we cannot rely on this code snippet. */
     signal (SIGPIPE, SIG_IGN);
+    /* Restore default for SIGCHLD in case parent ignores it. */
+    signal (SIGCHLD, SIG_DFL);
 
 #ifdef HAVE_SETENV
 # ifndef NDEBUG