From: Jeff Trawick Date: Wed, 28 Feb 2001 18:23:37 +0000 (+0000) Subject: Pass the correct worker thread id to worker_thread() when the initial X-Git-Tag: 2.0.14~40 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=52f43d1a7fd093ae2a2426bcfa534211f2514ed8;p=thirdparty%2Fapache%2Fhttpd.git Pass the correct worker thread id to worker_thread() when the initial 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 --- diff --git a/server/mpm/experimental/perchild/perchild.c b/server/mpm/experimental/perchild/perchild.c index 1dc0ac54f1a..7e3d6c31be4 100644 --- a/server/mpm/experimental/perchild/perchild.c +++ b/server/mpm/experimental/perchild/perchild.c @@ -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]); } diff --git a/server/mpm/perchild/perchild.c b/server/mpm/perchild/perchild.c index 1dc0ac54f1a..7e3d6c31be4 100644 --- a/server/mpm/perchild/perchild.c +++ b/server/mpm/perchild/perchild.c @@ -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]); }