cvs: php4 /main main.c

From: Date: Thu, 31 Aug 2000 16:02:51 +0000
Subject: cvs: php4 /main main.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-1470@lists.php.net to get a copy of this message
zeev Thu Aug 31 09:02:51 2000 EDT Modified files: /php4/main main.c Log: Safer shutdown process. Continue to shut down even if we bail out in the middle of a certain part. Index: php4/main/main.c diff -u php4/main/main.c:1.306 php4/main/main.c:1.307 --- php4/main/main.c:1.306 Wed Aug 30 11:06:17 2000 +++ php4/main/main.c Thu Aug 31 09:02:51 2000 @@ -19,7 +19,7 @@ */ -/* $Id: main.c,v 1.306 2000/08/30 18:06:17 zeev Exp $ */ +/* $Id: main.c,v 1.307 2000/08/31 16:02:51 zeev Exp $ */ #include <stdio.h> @@ -636,28 +636,43 @@ SLS_FETCH(); PLS_FETCH(); - if (setjmp(EG(bailout))!=0) { - return; + if (setjmp(EG(bailout)==0) { + sapi_send_headers(); } - sapi_send_headers(); - php_end_ob_buffers(SG(request_info).headers_only?0:1); + if (setjmp(EG(bailout)==0) { + php_end_ob_buffers(SG(request_info).headers_only?0:1); + } - php_call_shutdown_functions(); + if (setjmp(EG(bailout)==0) { + php_call_shutdown_functions(); + } if (PG(modules_activated)) { zend_deactivate_modules(); } - php_ini_rshutdown(); + if (setjmp(EG(bailout)==0) { + php_ini_rshutdown(); + } zend_deactivate(CLS_C ELS_CC); - sapi_deactivate(SLS_C); - shutdown_memory_manager(CG(unclean_shutdown), 0); - zend_unset_timeout(); + if (setjmp(EG(bailout)==0) { + sapi_deactivate(SLS_C); + } - global_unlock(); + if (setjmp(EG(bailout)==0) { + shutdown_memory_manager(CG(unclean_shutdown), 0); + } + + if (setjmp(EG(bailout)==0) { + zend_unset_timeout(); + } + + if (setjmp(EG(bailout)==0) { + global_unlock(); + } }

« previous php.cvs (#1470) next »