com php-src: fix phpdbg's -h switch: sapi/phpdbg/phpdbg.c

From: Date: Sun, 27 Sep 2015 13:46:07 +0000
Subject: com php-src: fix phpdbg's -h switch: sapi/phpdbg/phpdbg.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-89182@lists.php.net to get a copy of this message
Commit: c82e21619eb0644221a166c1179bed0f08c2f640 Author: Anatol Belski <ab@php.net> Sun, 27 Sep 2015 15:46:07 +0200 Parents: 7e3cd7cadf015c63d1042899b7ba5e5719cb4ce5 Branches: PHP-7.0 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=c82e21619eb0644221a166c1179bed0f08c2f640 Log: fix phpdbg's -h switch The help functionality needs a correct stdout fd, so pre setup it for the only case. Changed paths: M sapi/phpdbg/phpdbg.c Diff: diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c index a66576c..c3f0cc6 100644 --- a/sapi/phpdbg/phpdbg.c +++ b/sapi/phpdbg/phpdbg.c @@ -1500,6 +1500,10 @@ phpdbg_main: sapi_startup(phpdbg); phpdbg->startup(phpdbg); PHPDBG_G(flags) = 0; + /* It ain't gonna proceed to real execution anyway, + but the correct descriptor is needed already. */ + PHPDBG_G(io)[PHPDBG_STDOUT].ptr = stdout; + PHPDBG_G(io)[PHPDBG_STDOUT].fd = fileno(stdout); phpdbg_set_prompt(PHPDBG_DEFAULT_PROMPT); phpdbg_do_help(NULL); sapi_deactivate();

« previous php.cvs (#89182) next »