summaryrefslogtreecommitdiffstats
path: root/server/mpm/simple/simple_run.c
diff options
context:
space:
mode:
authorPaul Querna <pquerna@apache.org>2008-11-01 07:02:01 +0100
committerPaul Querna <pquerna@apache.org>2008-11-01 07:02:01 +0100
commiteac12b8b18d8f0a39f250b4e2a4ec3b2aa71cc51 (patch)
tree8d21ad18804f513c7f9433227d118b823c23f1f6 /server/mpm/simple/simple_run.c
parentNote crash fix in mod_authn_core.c from r709553. (diff)
downloadapache2-eac12b8b18d8f0a39f250b4e2a4ec3b2aa71cc51.tar.xz
apache2-eac12b8b18d8f0a39f250b4e2a4ec3b2aa71cc51.zip
Move creation of the pollcb object to after we fork(), since kqueues don't persist across fork(). (huh, didn't know that before)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@709653 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--server/mpm/simple/simple_run.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/server/mpm/simple/simple_run.c b/server/mpm/simple/simple_run.c
index 691c27523a..837bb78381 100644
--- a/server/mpm/simple/simple_run.c
+++ b/server/mpm/simple/simple_run.c
@@ -261,10 +261,30 @@ static int simple_setup_privs(simple_core_t * sc)
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 @@ int simple_main_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,