mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Always properly show exit status in phpdbg
Especially when it is only set after main run (e.g. register_shutdown_function)
This commit is contained in:
parent
16cde23eb2
commit
8f85dc141a
1 changed files with 6 additions and 1 deletions
|
@ -1305,7 +1305,7 @@ int main(int argc, char **argv) /* {{{ */
|
|||
zend_bool ext_stmt = 0;
|
||||
zend_bool use_mm_wrappers = 0;
|
||||
zend_bool is_exit;
|
||||
int exit_status = 0;
|
||||
int exit_status;
|
||||
|
||||
#ifdef ZTS
|
||||
void ***tsrm_ls;
|
||||
|
@ -1359,6 +1359,7 @@ phpdbg_main:
|
|||
php_optind = 1;
|
||||
opt = 0;
|
||||
sapi_name = NULL;
|
||||
exit_status = 0;
|
||||
if (settings) {
|
||||
exec = settings->exec;
|
||||
}
|
||||
|
@ -1971,6 +1972,10 @@ phpdbg_out:
|
|||
php_request_shutdown(NULL);
|
||||
} zend_end_try();
|
||||
|
||||
if (exit_status == 0) {
|
||||
exit_status = EG(exit_status);
|
||||
}
|
||||
|
||||
if (!(PHPDBG_G(flags) & PHPDBG_IS_QUITTING)) {
|
||||
if (PHPDBG_G(in_execution) || is_exit) {
|
||||
if (!quit_immediately && !phpdbg_startup_run) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue