]> granicus.if.org Git - php/commitdiff
Start RC_DEBUG at the end of MINIT and finish in MSHUTDOWN after all worker threads...
authorDmitry Stogov <dmitry@zend.com>
Thu, 2 Nov 2017 20:52:50 +0000 (23:52 +0300)
committerDmitry Stogov <dmitry@zend.com>
Thu, 2 Nov 2017 20:52:50 +0000 (23:52 +0300)
main/main.c

index 7b43e2e0f0dcb7fe6ac06eb0f0fdadc052314cb2..0b86eca20504586fe93ae139c1aec36d35c5995b 100644 (file)
@@ -1596,10 +1596,6 @@ int php_request_startup(void)
 {
        int retval = SUCCESS;
 
-#if ZEND_RC_DEBUG
-       zend_rc_debug = 1;
-#endif
-
        zend_interned_strings_activate();
 
 #ifdef HAVE_DTRACE
@@ -1809,10 +1805,6 @@ void php_request_shutdown(void *dummy)
 #ifdef HAVE_DTRACE
        DTRACE_REQUEST_SHUTDOWN(SAFE_FILENAME(SG(request_info).path_translated), SAFE_FILENAME(SG(request_info).request_uri), (char *)SAFE_FILENAME(SG(request_info).request_method));
 #endif /* HAVE_DTRACE */
-
-#if ZEND_RC_DEBUG
-       zend_rc_debug = 0;
-#endif
 }
 /* }}} */
 
@@ -2282,6 +2274,10 @@ int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_mod
 
        zend_interned_strings_switch_storage(1);
 
+#if ZEND_RC_DEBUG
+       zend_rc_debug = 1;
+#endif
+
        /* we're done */
        return retval;
 }
@@ -2319,6 +2315,10 @@ void php_module_shutdown(void)
        ts_free_worker_threads();
 #endif
 
+#if ZEND_RC_DEBUG
+       zend_rc_debug = 0;
+#endif
+
 #ifdef PHP_WIN32
        (void)php_win32_shutdown_random_bytes();
 #endif