Skip to content

Commit

Permalink
Fixed bug #62725 (Calling exit() in a shutdown function does not retu…
Browse files Browse the repository at this point in the history
…rn the exit value)

The fix is make 5.4 behavior consistent with 5.3
  • Loading branch information
laruence committed Aug 2, 2012
1 parent 170ee90 commit d1f0662
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions NEWS
Expand Up @@ -2,6 +2,10 @@ PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2012, PHP 5.4.7

- Core:
. Fixed bug #62725 (Calling exit() in a shutdown function does not return
the exit value). (Laruence)

- PDO:
. Fixed bug #62685 (Wrong return datatype in PDO::inTransaction()). (Laruence)

Expand Down
6 changes: 3 additions & 3 deletions sapi/cli/php_cli.c
Expand Up @@ -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);
Expand Down

0 comments on commit d1f0662

Please sign in to comment.