]> granicus.if.org Git - php/commitdiff
make sigchild handler more robust.
authorThies C. Arntzen <thies@php.net>
Fri, 19 May 2000 10:40:34 +0000 (10:40 +0000)
committerThies C. Arntzen <thies@php.net>
Fri, 19 May 2000 10:40:34 +0000 (10:40 +0000)
main/main.c

index b00cd456ec142cb3b967da22add14ddbd5170b71..93a60a048f9510debb595ced114e53a783b92c2c 100644 (file)
@@ -640,8 +640,8 @@ static void php_message_handler_for_zend(long message, void *data)
 #if PHP_SIGCHILD
 static int sigchld_handler(int apar)
 {
-    int status;             
-    wait(&status);
+    while (waitpid(-1, NULL, WNOHANG) > 0)
+               ;
     signal(SIGCHLD,sigchld_handler);   
 }
 #endif