httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pque...@apache.org
Subject svn commit: r709653 - in /httpd/httpd/trunk/server/mpm/simple: simple_core.c simple_run.c
Date Sat, 01 Nov 2008 06:02:01 GMT
Author: pquerna
Date: Fri Oct 31 23:02:01 2008
New Revision: 709653

URL: http://svn.apache.org/viewvc?rev=709653&view=rev
Log:
Move creation of the pollcb object to after we fork(), since kqueues don't persist across
fork(). (huh, didn't know that before)

Modified:
    httpd/httpd/trunk/server/mpm/simple/simple_core.c
    httpd/httpd/trunk/server/mpm/simple/simple_run.c

Modified: httpd/httpd/trunk/server/mpm/simple/simple_core.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/simple/simple_core.c?rev=709653&r1=709652&r2=709653&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/simple/simple_core.c (original)
+++ httpd/httpd/trunk/server/mpm/simple/simple_core.c Fri Oct 31 23:02:01 2008
@@ -63,14 +63,5 @@
         return rv;
     }
 
-    rv = apr_pollcb_create(&sc->pollcb, 512 /* pqXXXXX: make configrable */ ,
-                           sc->pool, 0);
-
-    if (rv) {
-        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL,
-                     "simple_core_init: apr_pollcb_create failed.");
-        return rv;
-    }
-
     return APR_SUCCESS;
 }

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=709653&r1=709652&r2=709653&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/simple/simple_run.c (original)
+++ httpd/httpd/trunk/server/mpm/simple/simple_run.c Fri Oct 31 23:02:01 2008
@@ -261,10 +261,30 @@
     return 0;
 }
 
+static int simple_setup_pollcb(simple_core_t * sc)
+{
+    apr_status_t rv;
+
+    rv = apr_pollcb_create(&sc->pollcb, 512 /* pqXXXXX: make configrable */ ,
+                           sc->pool, 0);
+    
+    if (rv) {
+        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL,
+                     "simple_core_init: apr_pollcb_create failed.");
+        return rv;
+    }
+    return rv;
+}
+
 int simple_child_loop(simple_core_t * sc)
 {
     apr_status_t rv;
 
+    rv = simple_setup_pollcb(sc);
+    if (rv) {
+        return rv;
+    }
+
     rv = simple_setup_workers(sc);
     if (rv) {
         ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL,
@@ -295,6 +315,11 @@
 {
     apr_status_t rv;
 
+    rv = simple_setup_pollcb(sc);
+    if (rv) {
+        return rv;
+    }
+    
     rv = simple_setup_workers(sc);
     if (rv) {
         ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL,



Mime
View raw message