[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apr-cvs
Subject:    svn commit: r1675982 - /apr/apr/trunk/memory/unix/apr_pools.c
From:       brane () apache ! org
Date:       2015-04-24 23:04:54
Message-ID: 20150424230454.961A7AC006A () hades ! apache ! org
[Download RAW message or body]

Author: brane
Date: Fri Apr 24 23:04:54 2015
New Revision: 1675982

URL: http://svn.apache.org/r1675982
Log:
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.

Modified:
    apr/apr/trunk/memory/unix/apr_pools.c

Modified: apr/apr/trunk/memory/unix/apr_pools.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/memory/unix/apr_pools.c?rev=1675982&r1=1675981&r2=1675982&view=diff
 ==============================================================================
--- apr/apr/trunk/memory/unix/apr_pools.c (original)
+++ apr/apr/trunk/memory/unix/apr_pools.c Fri Apr 24 23:04:54 2015
@@ -1683,13 +1683,6 @@ APR_DECLARE(apr_status_t) apr_pool_initi
     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_initi
             "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) */
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic