]> granicus.if.org Git - php/commitdiff
MFH: Fixed bug #23509 (exit code lost when exit() called from
authorIlia Alshanetsky <iliaa@php.net>
Fri, 1 Aug 2003 12:29:48 +0000 (12:29 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Fri, 1 Aug 2003 12:29:48 +0000 (12:29 +0000)
register_shutdown_function())

NEWS
sapi/cgi/cgi_main.c
sapi/cli/php_cli.c

diff --git a/NEWS b/NEWS
index 912bdbe952d85d1b7f89739c8b2e5d121d93bc4f..b1b00e7941c485e5110fab4d4d8f977ca5e162b2 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,8 @@ PHP 4                                                                      NEWS
 ?? Aug 2003, Version 4.3.3RC3
 - Fixed bug #24883 (variables_order and gpc_order being ignored). (Ilia)
 - Fixed bug #24871 (methods misidentified as constructors). (Ilia)
+- Fixed bug #23509 (exit code lost when exit() called from 
+  register_shutdown_function()). (Ilia)
 - Fixed bug #22154 (Possible crash when memory_limit is reached and
   output buffering in addition to session.use_trans_sid is used). (Ilia)
 
index 4d6cf165687a9e6abf18170a8658dcc6dfad5eec..575b1be6a14993cf2593dfa74754422b33423677 100644 (file)
@@ -1597,6 +1597,7 @@ fastcgi_request_done:
                        }
                        
                        php_request_shutdown((void *) 0);
+                       exit_status = EG(exit_status);
 
                        if (SG(request_info).path_translated) {
                                free(SG(request_info).path_translated);
index 11365dff7809a9516720fb1bd061b86b66e89051..3b0e1a931c9ab05d980a5eb637e275fad3b81f0c 100644 (file)
@@ -865,13 +865,11 @@ int main(int argc, char *argv[])
                if (cli_sapi_module.php_ini_path_override) {
                        free(cli_sapi_module.php_ini_path_override);
                }
-
-       } zend_catch {
-               exit_status = EG(exit_status);
        } zend_end_try();
 
 out:
        php_request_shutdown((void *) 0);
+       exit_status = EG(exit_status);
 out_err:       
        if (module_started) {
                php_module_shutdown(TSRMLS_C);