summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Weinand <bobwei9@hotmail.com>2015-08-30 20:25:10 +0200
committerBob Weinand <bobwei9@hotmail.com>2015-08-30 20:25:10 +0200
commit54a831829ad18144caec1afbec7ff4a65bc79a5d (patch)
tree28ea5bd74d83027932ebdc376bc7fa6401ab6ac3
parent5f006ade649d0978d208917b1977ff0baec90b0d (diff)
downloadphp-git-54a831829ad18144caec1afbec7ff4a65bc79a5d.tar.gz
Respect exit status for -rr option with phpdbg
-rw-r--r--sapi/phpdbg/phpdbg.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c
index 08fb029d92..9d87fdfa76 100644
--- a/sapi/phpdbg/phpdbg.c
+++ b/sapi/phpdbg/phpdbg.c
@@ -1300,6 +1300,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;
#ifdef ZTS
void ***tsrm_ls;
@@ -1822,6 +1823,7 @@ phpdbg_interact:
if (quit_immediately) {
/* if -r is on the command line more than once just quit */
EG(bailout) = __orig_bailout; /* reset zend_try */
+ exit_status = EG(exit_status);
break;
}
}
@@ -1998,5 +2000,6 @@ phpdbg_out:
free(PHPDBG_G(sapi_name_ptr));
}
- return 0;
+ /* usually 0; just for -rr */
+ return exit_status;
} /* }}} */