httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pque...@apache.org
Subject svn commit: r789064 - /httpd/httpd/trunk/server/mpm/simple/simple_run.c
Date Sun, 28 Jun 2009 08:13:43 GMT
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;



Mime
View raw message