httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yla...@apache.org
Subject svn commit: r1640184 - /httpd/httpd/trunk/server/mpm/prefork/prefork.c
Date Mon, 17 Nov 2014 16:31:07 GMT
Author: ylavic
Date: Mon Nov 17 16:31:06 2014
New Revision: 1640184

URL: http://svn.apache.org/r1640184
Log:
mpm_prefork: follow up to r1635521.
Avoid oddity on bucket_make_child_record overflow.

Modified:
    httpd/httpd/trunk/server/mpm/prefork/prefork.c

Modified: httpd/httpd/trunk/server/mpm/prefork/prefork.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/prefork/prefork.c?rev=1640184&r1=1640183&r2=1640184&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/prefork/prefork.c (original)
+++ httpd/httpd/trunk/server/mpm/prefork/prefork.c Mon Nov 17 16:31:06 2014
@@ -858,10 +858,10 @@ static void startup_children(int number_
     }
 }
 
-static int bucket_make_child_record = -1;
-static int bucket_kill_child_record = -1;
 static void perform_idle_server_maintenance(apr_pool_t *p)
 {
+    static int bucket_make_child_record = -1;
+    static int bucket_kill_child_record = -1;
     int i;
     int idle_count;
     worker_score *ws;
@@ -939,8 +939,9 @@ static void perform_idle_server_maintena
             }
             for (i = 0; i < free_length; ++i) {
                 bucket_make_child_record++;
+                bucket_make_child_record %= num_buckets;
                 make_child(ap_server_conf, free_slots[i],
-                           bucket_make_child_record % num_buckets);
+                           bucket_make_child_record);
             }
             /* the next time around we want to spawn twice as many if this
              * wasn't good enough, but not if we've just done a graceful



Mime
View raw message