Fixed wrong PID variable in httpd fork
authorDan
Wed, 08 Oct 2008 21:56:21 -0400
changeset 56 53b0f0d7ff6f
parent 55 b8a3c9c54fbe
child 57 31ce64a3ff6c
Fixed wrong PID variable in httpd fork
webserver.php
--- a/webserver.php	Wed Oct 08 21:22:48 2008 -0400
+++ b/webserver.php	Wed Oct 08 21:56:21 2008 -0400
@@ -508,7 +508,8 @@
       // fork off if possible
       if ( function_exists('pcntl_fork') && $this->allow_fork && !$this->in_keepalive )
       {
-        if ( $this->threader->fork() == Threader::FORK_CHILD )
+        $fork_result = $this->threader->fork();
+        if ( $fork_result == Threader::FORK_CHILD )
         {
           // this is the child
           define('HTTPD_WS_CHILD', 1);
@@ -517,7 +518,7 @@
         {
           // we are the parent, continue listening
           $remote->soft_shutdown();
-          $this->child_list[] = $pid;
+          $this->child_list[] = $fork_result;
           continue;
         }
       }