From d1f0662e4d587754742891f0a179551d8f36674f Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Thu, 2 Aug 2012 23:03:38 +0800 Subject: 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 --- sapi/cli/php_cli.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sapi/cli/php_cli.c') 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); -- cgit v1.2.1