diff options
author | Joe Orton <jorton@apache.org> | 2019-06-21 09:24:19 +0000 |
---|---|---|
committer | Joe Orton <jorton@apache.org> | 2019-06-21 09:24:19 +0000 |
commit | a87aa081073658cc3be775357bc96c18f25826f9 (patch) | |
tree | b990eb1f436bd339acf5cb9b2945e12116500edb | |
parent | b6f137d7847e866d5be1cd2ef6d1e79dd7764914 (diff) | |
download | httpd-a87aa081073658cc3be775357bc96c18f25826f9.tar.gz |
* server/scoreboard.c (open_scoreboard): Create the scoreboard in the
parent of pconf rather than creating another global pool.
PR: 43471
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1861765 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | server/scoreboard.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/server/scoreboard.c b/server/scoreboard.c index bacc464789..a028447ffb 100644 --- a/server/scoreboard.c +++ b/server/scoreboard.c @@ -210,19 +210,12 @@ static apr_status_t open_scoreboard(apr_pool_t *pconf) #if APR_HAS_SHARED_MEMORY apr_status_t rv; char *fname = NULL; - apr_pool_t *global_pool; - - /* We don't want to have to recreate the scoreboard after - * restarts, so we'll create a global pool and never clean it. - */ - rv = apr_pool_create(&global_pool, NULL); - if (rv != APR_SUCCESS) { - ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf, APLOGNO(00002) - "Fatal error: unable to create global pool " - "for use by the scoreboard"); - return rv; - } + apr_pool_t *global_pool = apr_pool_parent_get(pconf); + /* If this is not passed pconf, or pconf is no longer a direct + * child of a global pool, this should change... */ + AP_DEBUG_ASSERT(apr_pool_parent_get(global_pool) == NULL); + /* The config says to create a name-based shmem */ if (ap_scoreboard_fname) { /* make sure it's an absolute pathname */ |