You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by jo...@apache.org on 2019/06/21 09:24:20 UTC

svn commit: r1861765 - /httpd/httpd/trunk/server/scoreboard.c

Author: jorton
Date: Fri Jun 21 09:24:19 2019
New Revision: 1861765

URL: http://svn.apache.org/viewvc?rev=1861765&view=rev
Log:
* server/scoreboard.c (open_scoreboard): Create the scoreboard in the
  parent of pconf rather than creating another global pool.

PR: 43471

Modified:
    httpd/httpd/trunk/server/scoreboard.c

Modified: httpd/httpd/trunk/server/scoreboard.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/scoreboard.c?rev=1861765&r1=1861764&r2=1861765&view=diff
==============================================================================
--- httpd/httpd/trunk/server/scoreboard.c (original)
+++ httpd/httpd/trunk/server/scoreboard.c Fri Jun 21 09:24:19 2019
@@ -210,19 +210,12 @@ static apr_status_t open_scoreboard(apr_
 #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 */