summaryrefslogtreecommitdiff
path: root/memory
diff options
context:
space:
mode:
authorbrane <brane@13f79535-47bb-0310-9956-ffa450edef68>2015-04-24 23:04:54 +0000
committerbrane <brane@13f79535-47bb-0310-9956-ffa450edef68>2015-04-24 23:04:54 +0000
commit779eea62d54de0a67bd2ba66aee5666467623d42 (patch)
tree969612088a660adf6ee8b80d47f9e6be0f25e371 /memory
parent7fa5beacc9aa23d0cff15f4ddb450adf7b974a29 (diff)
downloadlibapr-779eea62d54de0a67bd2ba66aee5666467623d42.tar.gz
Register the pool debug log cleanup handler after emitting the
global pool creation event. This ensures that the allocation event from the cleanup registration written after the creation event. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1675982 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'memory')
-rw-r--r--memory/unix/apr_pools.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/memory/unix/apr_pools.c b/memory/unix/apr_pools.c
index 6d02e1bdc..138180b77 100644
--- a/memory/unix/apr_pools.c
+++ b/memory/unix/apr_pools.c
@@ -1683,13 +1683,6 @@ APR_DECLARE(apr_status_t) apr_pool_initialize(void)
file_stderr = debug_log;
if (file_stderr) {
- /* Add a cleanup handler that sets the debug log file handle
- * to NULL, otherwise we'll try to log the global pool
- * destruction event with predictably disastrous results. */
- apr_pool_cleanup_register(global_pool, NULL,
- apr_pool_cleanup_file_stderr,
- apr_pool_cleanup_null);
-
apr_file_printf(file_stderr,
"POOL DEBUG: [PID"
#if APR_HAS_THREADS
@@ -1699,6 +1692,13 @@ APR_DECLARE(apr_status_t) apr_pool_initialize(void)
"POOL \"TAG\" <__FILE__:__LINE__> PARENT (ALLOCS/TOTAL ALLOCS/CLEARS)\n");
apr_pool_log_event(global_pool, "GLOBAL", __FILE__ ":apr_pool_initialize", 0);
+
+ /* Add a cleanup handler that sets the debug log file handle
+ * to NULL, otherwise we'll try to log the global pool
+ * destruction event with predictably disastrous results. */
+ apr_pool_cleanup_register(global_pool, NULL,
+ apr_pool_cleanup_file_stderr,
+ apr_pool_cleanup_null);
}
#endif /* (APR_POOL_DEBUG & APR_POOL_DEBUG_VERBOSE_ALL) */