diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2003-08-01 12:26:28 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2003-08-01 12:26:28 +0000 |
commit | 68616d764c6787caea037809f53105e3e0f58fca (patch) | |
tree | d55ca00c589bf7f574565c9378db9f69ea9d1ccd | |
parent | a0ad4f949e137af1ef6c7c753ec8c2a321f49998 (diff) | |
download | php-git-68616d764c6787caea037809f53105e3e0f58fca.tar.gz |
Fixed bug #23509 (exit code lost when exit() called from
register_shutdown_function())
-rw-r--r-- | sapi/cgi/cgi_main.c | 2 | ||||
-rw-r--r-- | sapi/cli/php_cli.c | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index f7c038bb5e..06e6653733 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -1558,7 +1558,6 @@ consult the installation file that came with this distribution, or visit \n\ switch (behavior) { case PHP_MODE_STANDARD: php_execute_script(&file_handle TSRMLS_CC); - exit_status = EG(exit_status); break; case PHP_MODE_LINT: PG(during_request_startup) = 0; @@ -1615,6 +1614,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); diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index 55de63b5da..8291cee0de 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -1009,13 +1009,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); |