From: Ryan Bloom Date: Wed, 7 Feb 2001 20:49:25 +0000 (+0000) Subject: Get the Unix MPMs restarting again. If we are going to register a cleanup X-Git-Tag: APACHE_2_0_2001_02_09~18 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ded4233ad520d9948b30ea2a8584122221e318c9;p=apache Get the Unix MPMs restarting again. If we are going to register a cleanup for ap_cleanup_scoreboard, then we have to kill that cleanup with the same function. This also makes ap_cleanup_scoreboard a non-static function, and makes ap_cleanup_shared_mem a static function. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88012 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 51141347de..9eb6100e44 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,10 @@ Changes with Apache 2.0b1 + *) Get the Unix MPM's to do a graceful restart again. If we are going + to register a cleanup with ap_cleanup_scoreboard, then we have to + kill the cleanup with the same function, and that function can't be + static. [Ryan Bloom] + *) Install all required header files. Without these, it was not possible to compile some modules outside of the server. [Ryan Bloom] diff --git a/include/scoreboard.h b/include/scoreboard.h index a6cbd33ca3..dcbdb8234f 100644 --- a/include/scoreboard.h +++ b/include/scoreboard.h @@ -231,7 +231,7 @@ typedef struct { AP_DECLARE(int) ap_exists_scoreboard_image(void); AP_DECLARE(void) ap_create_scoreboard(apr_pool_t *p, ap_scoreboard_e t); void reinit_scoreboard(apr_pool_t *p); -apr_status_t ap_cleanup_shared_mem(void *d); +AP_DECLARE(apr_status_t) ap_cleanup_scoreboard(void *d); AP_DECLARE(void) reopen_scoreboard(apr_pool_t *p); diff --git a/server/mpm/dexter/dexter.c b/server/mpm/dexter/dexter.c index 367cf547e3..4b784c932f 100644 --- a/server/mpm/dexter/dexter.c +++ b/server/mpm/dexter/dexter.c @@ -258,7 +258,7 @@ static void ap_start_restart(int graceful) restart_pending = 1; is_graceful = graceful; if (is_graceful) { - apr_kill_cleanup(pconf, NULL, ap_cleanup_shared_mem); + apr_kill_cleanup(pconf, NULL, ap_cleanup_scoreboard); } } diff --git a/server/mpm/experimental/perchild/perchild.c b/server/mpm/experimental/perchild/perchild.c index d3a67c215a..276651ee39 100644 --- a/server/mpm/experimental/perchild/perchild.c +++ b/server/mpm/experimental/perchild/perchild.c @@ -296,7 +296,7 @@ static void ap_start_restart(int graceful) restart_pending = 1; is_graceful = graceful; if (is_graceful) { - apr_kill_cleanup(pconf, NULL, ap_cleanup_shared_mem); + apr_kill_cleanup(pconf, NULL, ap_cleanup_scoreboard); } } diff --git a/server/mpm/mpmt_pthread/mpmt_pthread.c b/server/mpm/mpmt_pthread/mpmt_pthread.c index e12a76113c..dc5951a782 100644 --- a/server/mpm/mpmt_pthread/mpmt_pthread.c +++ b/server/mpm/mpmt_pthread/mpmt_pthread.c @@ -251,7 +251,7 @@ static void ap_start_restart(int graceful) restart_pending = 1; is_graceful = graceful; if (is_graceful) { - apr_kill_cleanup(pconf, NULL, ap_cleanup_shared_mem); + apr_kill_cleanup(pconf, NULL, ap_cleanup_scoreboard); } } diff --git a/server/mpm/perchild/perchild.c b/server/mpm/perchild/perchild.c index d3a67c215a..276651ee39 100644 --- a/server/mpm/perchild/perchild.c +++ b/server/mpm/perchild/perchild.c @@ -296,7 +296,7 @@ static void ap_start_restart(int graceful) restart_pending = 1; is_graceful = graceful; if (is_graceful) { - apr_kill_cleanup(pconf, NULL, ap_cleanup_shared_mem); + apr_kill_cleanup(pconf, NULL, ap_cleanup_scoreboard); } } diff --git a/server/mpm/prefork/prefork.c b/server/mpm/prefork/prefork.c index 00a13a83db..959943b218 100644 --- a/server/mpm/prefork/prefork.c +++ b/server/mpm/prefork/prefork.c @@ -399,7 +399,7 @@ static void restart(int sig) } restart_pending = 1; if ((is_graceful = (sig == SIGWINCH))) { - apr_kill_cleanup(pconf, NULL, ap_cleanup_shared_mem); + apr_kill_cleanup(pconf, NULL, ap_cleanup_scoreboard); } } diff --git a/server/scoreboard.c b/server/scoreboard.c index 2d4353b884..1f7d9602f1 100644 --- a/server/scoreboard.c +++ b/server/scoreboard.c @@ -93,7 +93,7 @@ static apr_shmem_t *scoreboard_shm = NULL; * segment, etc.). Leave it as is now because it is being used * by various MPMs. */ -apr_status_t ap_cleanup_shared_mem(void *d) +static apr_status_t ap_cleanup_shared_mem(void *d) { #if APR_HAS_SHARED_MEMORY apr_shm_free(scoreboard_shm, ap_scoreboard_image); @@ -142,7 +142,7 @@ AP_DECLARE(void) reopen_scoreboard(apr_pool_t *p) /* ap_cleanup_scoreboard * */ -static apr_status_t ap_cleanup_scoreboard(void *d) { +apr_status_t ap_cleanup_scoreboard(void *d) { if (ap_scoreboard_image == NULL) return APR_SUCCESS; if (ap_scoreboard_image->global.sb_type == SB_SHARED) {