diff mplayer.c @ 33490:b180edfecf1b

Clarify child_sighandler loop.
author cboesch
date Sat, 11 Jun 2011 13:27:29 +0000
parents e46989c7f47e
children 52545582f44d
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