[vlc-commits] commit: Force SIGCHLD to default handler ( Rémi Denis-Courmont )

git at videolan.org git at videolan.org
Thu May 27 17:48:52 CEST 2010


vlc/vlc-1.1 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu May 27 18:46:47 2010 +0300| [324a2db1a7d45fe7e6bb5a463fa16e54e596d4b4] | committer: Rémi Denis-Courmont 

Force SIGCHLD to default handler

... so that waitpid() works even if our parent process ignores SIGCHLD
(SIG_IGN is preserved across exec*()).
(cherry picked from commit 94763831fb59701a30f7e55c8ce9258ddbeeff18)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=324a2db1a7d45fe7e6bb5a463fa16e54e596d4b4
---

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

diff --git a/bin/vlc.c b/bin/vlc.c
index b99b5aa..9586162 100644
--- 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



More information about the vlc-commits mailing list