Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Apache: CVS

svn commit: r789064 - /httpd/httpd/trunk/server/mpm/simple/simple_run.c

 

 

Apache cvs RSS feed   Index | Next | Previous | View Threaded


pquerna at apache

Jun 28, 2009, 1:13 AM

Post #1 of 1 (133 views)
Permalink
svn commit: r789064 - /httpd/httpd/trunk/server/mpm/simple/simple_run.c

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;

Apache cvs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.