com php-src: Respect exit status for -rr option with phpdbg: sapi/phpdbg/phpdbg.c

From: Date: Sun, 30 Aug 2015 18:25:10 +0000
Subject: com php-src: Respect exit status for -rr option with phpdbg: sapi/phpdbg/phpdbg.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-88801@lists.php.net to get a copy of this message
Commit: 54a831829ad18144caec1afbec7ff4a65bc79a5d Author: Bob Weinand <bobwei9@hotmail.com> Sun, 30 Aug 2015 20:25:10 +0200 Parents: 5f006ade649d0978d208917b1977ff0baec90b0d Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=54a831829ad18144caec1afbec7ff4a65bc79a5d Log: Respect exit status for -rr option with phpdbg Changed paths: M sapi/phpdbg/phpdbg.c Diff: diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c index 08fb029..9d87fdf 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; } /* }}} */

« previous php.cvs (#88801) next »