[vlc-commits] Restore correct SIGCHLD handling

Rémi Denis-Courmont git at videolan.org
Sun Jan 30 13:21:02 CET 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Jan 30 14:20:26 2011 +0200| [5dc560308c06e1862a0250651e5595fc7b0c2a82] | committer: Rémi Denis-Courmont

Restore correct SIGCHLD handling

This affects way too many code paths. Let KDE fix their own crap.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5dc560308c06e1862a0250651e5595fc7b0c2a82
---

 bin/vlc.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/bin/vlc.c b/bin/vlc.c
index 1bc6a27..00da32c 100644
--- a/bin/vlc.c
+++ b/bin/vlc.c
@@ -157,12 +157,11 @@ int main( int i_argc, const char *ppsz_argv[] )
     sigaddset (&set, SIGPIPE);
 
     /* SIGCHLD must be dequeued to clean up zombie child processes.
-     * Furthermore the handler must not be set to SIG_IGN (see above). */
-    /* Unfortunately, the QProcess class from Qt4 has a bug. It installs a
-     * custom signal handlers and gets stuck if it is not called. So we cannot
-     * use sigwait() for SIGCHLD:
-     * http://bugs.kde.org/show_bug.cgi?id=260719 */
-    //sigaddset (&set, SIGCHLD);
+     * Furthermore the handler must not be set to SIG_IGN (see above).
+     * We cannot pragmatically handle EINTR, short reads and short writes
+     * in every code paths (including underlying libraries). So we just
+     * block SIGCHLD in all threads, and dequeue it with sigwait() below. */
+    sigaddset (&set, SIGCHLD);
 
 #ifdef HAVE_MAEMO
     sigaddset (&set, SIGRTMIN);



More information about the vlc-commits mailing list