From 54a831829ad18144caec1afbec7ff4a65bc79a5d Mon Sep 17 00:00:00 2001 From: Bob Weinand Date: Sun, 30 Aug 2015 20:25:10 +0200 Subject: Respect exit status for -rr option with phpdbg --- sapi/phpdbg/phpdbg.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; } /* }}} */ -- cgit v1.2.1