From cvs-return-32962-apmail-httpd-cvs-archive=httpd.apache.org@httpd.apache.org Sun Jun 28 08:13:58 2009 Return-Path: Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: (qmail 78606 invoked from network); 28 Jun 2009 08:13:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 28 Jun 2009 08:13:58 -0000 Received: (qmail 83145 invoked by uid 500); 28 Jun 2009 08:14:08 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 83026 invoked by uid 500); 28 Jun 2009 08:14:08 -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 83017 invoked by uid 99); 28 Jun 2009 08:14:07 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 28 Jun 2009 08:14:07 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.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; Sun, 28 Jun 2009 08:14:04 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 0E7F823888D3; Sun, 28 Jun 2009 08:13:44 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r789064 - /httpd/httpd/trunk/server/mpm/simple/simple_run.c Date: Sun, 28 Jun 2009 08:13:43 -0000 To: cvs@httpd.apache.org From: pquerna@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090628081344.0E7F823888D3@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: pquerna Date: Sun Jun 28 08:13:43 2009 New Revision: 789064 URL: http://svn.apache.org/viewvc?rev=789064&view=rev Log: server/mpm/simple/simple_run.c (simple_setup_pollcb): Only pollcbs created using KQueue, EPoll or Event Ports operate correctly with removing sockets across threads. Modified: httpd/httpd/trunk/server/mpm/simple/simple_run.c Modified: httpd/httpd/trunk/server/mpm/simple/simple_run.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/simple/simple_run.c?rev=789064&r1=789063&r2=789064&view=diff ============================================================================== --- httpd/httpd/trunk/server/mpm/simple/simple_run.c (original) +++ httpd/httpd/trunk/server/mpm/simple/simple_run.c Sun Jun 28 08:13:43 2009 @@ -254,14 +254,18 @@ static int simple_setup_pollcb(simple_core_t * sc) { + int i; apr_status_t rv; + int good_methods[] = {APR_POLLSET_KQUEUE, APR_POLLSET_PORT, APR_POLLSET_EPOLL}; - rv = apr_pollcb_create(&sc->pollcb, 512 /* pqXXXXX: make configrable */ , - sc->pool, 0); - + for (i = 0; i < sizeof(good_methods) / sizeof(void*); i++) { + /* pqXXXXX: make size of pollcb configrable or dynamic */ + rv = apr_pollcb_create_ex(&sc->pollcb, 512, + sc->pool, APR_POLLSET_NODEFAULT, good_methods[i]); + } if (rv) { ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL, - "simple_setup_pollcb: apr_pollcb_create failed."); + "simple_setup_pollcb: apr_pollcb_create failed for all possible backends!"); return rv; } return rv;