Return-Path: X-Original-To: apmail-httpd-cvs-archive@www.apache.org Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 396B11003B for ; Mon, 17 Nov 2014 16:31:29 +0000 (UTC) Received: (qmail 51056 invoked by uid 500); 17 Nov 2014 16:31:29 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 50988 invoked by uid 500); 17 Nov 2014 16:31:29 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 50976 invoked by uid 99); 17 Nov 2014 16:31:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Nov 2014 16:31:29 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Nov 2014 16:31:28 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 3399D23888D7; Mon, 17 Nov 2014 16:31:07 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1640184 - /httpd/httpd/trunk/server/mpm/prefork/prefork.c Date: Mon, 17 Nov 2014 16:31:07 -0000 To: cvs@httpd.apache.org From: ylavic@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20141117163107.3399D23888D7@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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