From: Zeev Suraski Date: Thu, 31 Aug 2000 16:01:31 +0000 (+0000) Subject: Safer shutdown process X-Git-Tag: php-4.0.3RC1~401 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=99af3ed8efc5f9770b1bd32fd03b0486c4dd5980;p=php Safer shutdown process --- diff --git a/Zend/zend.c b/Zend/zend.c index 3b3a1debdb..14aaae95a3 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -502,7 +502,9 @@ void zend_deactivate_modules() ELS_FETCH(); EG(opline_ptr) = NULL; /* we're no longer executing anything */ - zend_hash_apply(&module_registry, (int (*)(void *)) module_registry_cleanup); + if (setjmp(EG(bailout))==0) { + zend_hash_apply(&module_registry, (int (*)(void *)) module_registry_cleanup); + } } void zend_deactivate(CLS_D ELS_DC) @@ -511,9 +513,15 @@ void zend_deactivate(CLS_D ELS_DC) EG(opline_ptr) = NULL; EG(active_symbol_table) = NULL; - shutdown_scanner(CLS_C); - shutdown_executor(ELS_C); - shutdown_compiler(CLS_C); + if (setjmp(EG(bailout))==0) { + shutdown_scanner(CLS_C); + } + if (setjmp(EG(bailout))==0) { + shutdown_executor(ELS_C); + } + if (setjmp(EG(bailout))==0) { + shutdown_compiler(CLS_C); + } }