changeset 33490:b180edfecf1b

Clarify child_sighandler loop.
author cboesch
date Sat, 11 Jun 2011 13:27:29 +0000
parents fbd79ef3992b
children 52545582f44d
files mplayer.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mplayer.c	Fri Jun 10 12:52:23 2011 +0000
+++ b/mplayer.c	Sat Jun 11 13:27:29 2011 +0000
@@ -792,7 +792,9 @@
 static void child_sighandler(int x)
 {
     pid_t pid;
-    while ((pid = waitpid(-1, NULL, WNOHANG)) > 0) ;
+    do {
+        pid = waitpid(-1, NULL, WNOHANG);
+    } while (pid > 0);
 }
 
 #endif