From cec6d4b87026e384a0c78ac94b4c5fcfdfdc3330 Mon Sep 17 00:00:00 2001 From: "William A. Rowe Jr" Date: Wed, 20 Mar 2002 05:58:21 +0000 Subject: [PATCH] The pre_mpm hook creates server-lifetime objects (or at least, for the generations across graceful restarts.) They should use the process pool. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94039 13f79535-47bb-0310-9956-ffa450edef68 --- server/mpm/beos/beos.c | 2 +- server/mpm/experimental/perchild/perchild.c | 2 +- server/mpm/netware/mpm_netware.c | 2 +- server/mpm/perchild/perchild.c | 2 +- server/mpm/prefork/prefork.c | 2 +- server/mpm/winnt/mpm_winnt.c | 2 +- server/mpm/worker/worker.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/server/mpm/beos/beos.c b/server/mpm/beos/beos.c index a703d8e506..99bc176443 100644 --- a/server/mpm/beos/beos.c +++ b/server/mpm/beos/beos.c @@ -839,7 +839,7 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) if (!is_graceful) { /* setup the scoreboard shared memory */ - if (ap_run_pre_mpm(pconf, SB_SHARED) != OK) { + if (ap_run_pre_mpm(s->process->pool, SB_SHARED) != OK) { return 1; } diff --git a/server/mpm/experimental/perchild/perchild.c b/server/mpm/experimental/perchild/perchild.c index 82b111a5d5..2216b914c7 100644 --- a/server/mpm/experimental/perchild/perchild.c +++ b/server/mpm/experimental/perchild/perchild.c @@ -1304,7 +1304,7 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) } if (!is_graceful) { - if (ap_run_pre_mpm(pconf, SB_SHARED) != OK) { + if (ap_run_pre_mpm(s->process->pool, SB_SHARED) != OK) { return 1; } } diff --git a/server/mpm/netware/mpm_netware.c b/server/mpm/netware/mpm_netware.c index 2b519d4c4b..84211461d3 100644 --- a/server/mpm/netware/mpm_netware.c +++ b/server/mpm/netware/mpm_netware.c @@ -893,7 +893,7 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) apr_thread_mutex_create(&accept_mutex, APR_THREAD_MUTEX_DEFAULT, pconf); if (!is_graceful) { - if (ap_run_pre_mpm(pconf, SB_NOT_SHARED) != OK) { + if (ap_run_pre_mpm(s->process->pool, SB_NOT_SHARED) != OK) { return 1; } } diff --git a/server/mpm/perchild/perchild.c b/server/mpm/perchild/perchild.c index 82b111a5d5..2216b914c7 100644 --- a/server/mpm/perchild/perchild.c +++ b/server/mpm/perchild/perchild.c @@ -1304,7 +1304,7 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) } if (!is_graceful) { - if (ap_run_pre_mpm(pconf, SB_SHARED) != OK) { + if (ap_run_pre_mpm(s->process->pool, SB_SHARED) != OK) { return 1; } } diff --git a/server/mpm/prefork/prefork.c b/server/mpm/prefork/prefork.c index 80c73de297..8a3f23c9a2 100644 --- a/server/mpm/prefork/prefork.c +++ b/server/mpm/prefork/prefork.c @@ -974,7 +974,7 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) } if (!is_graceful) { - if (ap_run_pre_mpm(pconf, SB_SHARED) != OK) { + if (ap_run_pre_mpm(s->process->pool, SB_SHARED) != OK) { return 1; } /* fix the generation number in the global score; we just got a new, diff --git a/server/mpm/winnt/mpm_winnt.c b/server/mpm/winnt/mpm_winnt.c index 46e470420b..03b1318c07 100644 --- a/server/mpm/winnt/mpm_winnt.c +++ b/server/mpm/winnt/mpm_winnt.c @@ -2389,7 +2389,7 @@ AP_DECLARE(int) ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s ) */ if (!restart && ((parent_pid == my_pid) || one_process)) { /* Set up the scoreboard. */ - if (ap_run_pre_mpm(pconf, SB_SHARED) != OK) { + if (ap_run_pre_mpm(s->process->pool, SB_SHARED) != OK) { return 1; } } diff --git a/server/mpm/worker/worker.c b/server/mpm/worker/worker.c index 2f54073f53..e5a0f15936 100644 --- a/server/mpm/worker/worker.c +++ b/server/mpm/worker/worker.c @@ -1508,7 +1508,7 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) } if (!is_graceful) { - if (ap_run_pre_mpm(pconf, SB_SHARED) != OK) { + if (ap_run_pre_mpm(s->process->pool, SB_SHARED) != OK) { return 1; } /* fix the generation number in the global score; we just got a new, -- 2.40.0