You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by pq...@apache.org on 2008/11/01 07:02:01 UTC
svn commit: r709653 - in /httpd/httpd/trunk/server/mpm/simple: simple_core.c
simple_run.c
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,