]> granicus.if.org Git - apache/commitdiff
Pass the correct worker thread id to worker_thread() when the initial
authorJeff Trawick <trawick@apache.org>
Wed, 28 Feb 2001 18:23:37 +0000 (18:23 +0000)
committerJeff Trawick <trawick@apache.org>
Wed, 28 Feb 2001 18:23:37 +0000 (18:23 +0000)
thread of the child process becomes a worker thread.

Prior to this, perchild segfaulted over and over at startup.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88396 13f79535-47bb-0310-9956-ffa450edef68

server/mpm/experimental/perchild/perchild.c
server/mpm/perchild/perchild.c

index 1dc0ac54f1ab6f961df6f01b25a63e37f0f7e3fb..7e3d6c31be441b4d13d5e3193c8de0db7cf1e8fd 100644 (file)
@@ -917,8 +917,8 @@ static void child_main(int child_num_arg)
         }
     }
 
-    /* This thread will be the one responsible for handling signals */
-    worker_thread(&worker_thread_free_ids[max_threads]);
+    /* This thread will be be a worker thread too. */
+    worker_thread(&worker_thread_free_ids[max_threads - 1]);
 
 }
 
index 1dc0ac54f1ab6f961df6f01b25a63e37f0f7e3fb..7e3d6c31be441b4d13d5e3193c8de0db7cf1e8fd 100644 (file)
@@ -917,8 +917,8 @@ static void child_main(int child_num_arg)
         }
     }
 
-    /* This thread will be the one responsible for handling signals */
-    worker_thread(&worker_thread_free_ids[max_threads]);
+    /* This thread will be be a worker thread too. */
+    worker_thread(&worker_thread_free_ids[max_threads - 1]);
 
 }