diff options
author | Xinchen Hui <laruence@php.net> | 2012-08-02 23:03:38 +0800 |
---|---|---|
committer | Xinchen Hui <laruence@php.net> | 2012-08-02 23:03:38 +0800 |
commit | d1f0662e4d587754742891f0a179551d8f36674f (patch) | |
tree | edf462176061f078a00c7638fc4b8ee45fd9e254 /sapi/cli/php_cli.c | |
parent | 170ee90bf962d288bdcf6cf0c8c4a2a30c5c1ba2 (diff) | |
download | php-git-d1f0662e4d587754742891f0a179551d8f36674f.tar.gz |
Fixed bug #62725 (Calling exit() in a shutdown function does not return the exit value)
The fix is make 5.4 behavior consistent with 5.3
Diffstat (limited to 'sapi/cli/php_cli.c')
-rw-r--r-- | sapi/cli/php_cli.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index 2cdd1aac6d..f9bf3ee60b 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -1167,15 +1167,15 @@ static int do_cli(int argc, char **argv TSRMLS_DC) /* {{{ */ } zend_end_try(); out: - if (exit_status == 0) { - exit_status = EG(exit_status); - } if (request_started) { php_request_shutdown((void *) 0); } if (translated_path) { free(translated_path); } + if (exit_status == 0) { + exit_status = EG(exit_status); + } return exit_status; err: sapi_deactivate(TSRMLS_C); |