derick                                   Thu, 14 Jul 2011 12:21:15 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=313243

Log:
- Added a check for an enviroment variable (ZEND_DONT_UNLOAD_MODULES) that, if
  set, prevents PHP from dl_closing() modules on shutdown.
- This makes it possible to spot memory leaks with valgrind in shared modules.

Changed paths:
    U   php/php-src/branches/PHP_5_4/Zend/zend_API.c
    U   php/php-src/trunk/Zend/zend_API.c

Modified: php/php-src/branches/PHP_5_4/Zend/zend_API.c
===================================================================
--- php/php-src/branches/PHP_5_4/Zend/zend_API.c        2011-07-14 12:05:51 UTC 
(rev 313242)
+++ php/php-src/branches/PHP_5_4/Zend/zend_API.c        2011-07-14 12:21:15 UTC 
(rev 313243)
@@ -2266,7 +2266,7 @@

 #if HAVE_LIBDL
 #if !(defined(NETWARE) && defined(APACHE_1_BUILD))
-       if (module->handle) {
+       if (module->handle && !getenv("ZEND_DONT_UNLOAD_MODULES")) {
                DL_UNLOAD(module->handle);
        }
 #endif

Modified: php/php-src/trunk/Zend/zend_API.c
===================================================================
--- php/php-src/trunk/Zend/zend_API.c   2011-07-14 12:05:51 UTC (rev 313242)
+++ php/php-src/trunk/Zend/zend_API.c   2011-07-14 12:21:15 UTC (rev 313243)
@@ -2266,7 +2266,7 @@

 #if HAVE_LIBDL
 #if !(defined(NETWARE) && defined(APACHE_1_BUILD))
-       if (module->handle) {
+       if (module->handle && !getenv("ZEND_DONT_UNLOAD_MODULES")) {
                DL_UNLOAD(module->handle);
        }
 #endif

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to