mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Run other RSHUTDOWN handlers if one fails
Motivated by bug #81316: If one RSHUTDOWN handler fails, still run the other ones. They may be doing something important...
This commit is contained in:
parent
f603934a5e
commit
cf6c354e1f
1 changed files with 17 additions and 19 deletions
|
@ -2978,29 +2978,27 @@ ZEND_API void zend_deactivate_modules(void) /* {{{ */
|
||||||
{
|
{
|
||||||
EG(current_execute_data) = NULL; /* we're no longer executing anything */
|
EG(current_execute_data) = NULL; /* we're no longer executing anything */
|
||||||
|
|
||||||
zend_try {
|
if (EG(full_tables_cleanup)) {
|
||||||
if (EG(full_tables_cleanup)) {
|
zend_module_entry *module;
|
||||||
zend_module_entry *module;
|
|
||||||
|
|
||||||
ZEND_HASH_REVERSE_FOREACH_PTR(&module_registry, module) {
|
ZEND_HASH_REVERSE_FOREACH_PTR(&module_registry, module) {
|
||||||
if (module->request_shutdown_func) {
|
if (module->request_shutdown_func) {
|
||||||
#if 0
|
zend_try {
|
||||||
zend_printf("%s: Request shutdown\n", module->name);
|
|
||||||
#endif
|
|
||||||
module->request_shutdown_func(module->type, module->module_number);
|
module->request_shutdown_func(module->type, module->module_number);
|
||||||
}
|
} zend_end_try();
|
||||||
} ZEND_HASH_FOREACH_END();
|
|
||||||
} else {
|
|
||||||
zend_module_entry **p = module_request_shutdown_handlers;
|
|
||||||
|
|
||||||
while (*p) {
|
|
||||||
zend_module_entry *module = *p;
|
|
||||||
|
|
||||||
module->request_shutdown_func(module->type, module->module_number);
|
|
||||||
p++;
|
|
||||||
}
|
}
|
||||||
|
} ZEND_HASH_FOREACH_END();
|
||||||
|
} else {
|
||||||
|
zend_module_entry **p = module_request_shutdown_handlers;
|
||||||
|
|
||||||
|
while (*p) {
|
||||||
|
zend_module_entry *module = *p;
|
||||||
|
zend_try {
|
||||||
|
module->request_shutdown_func(module->type, module->module_number);
|
||||||
|
} zend_end_try();
|
||||||
|
p++;
|
||||||
}
|
}
|
||||||
} zend_end_try();
|
}
|
||||||
}
|
}
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue