diff options
author | Antony Dovgal <tony2001@php.net> | 2007-02-22 10:06:22 +0000 |
---|---|---|
committer | Antony Dovgal <tony2001@php.net> | 2007-02-22 10:06:22 +0000 |
commit | dfbc2245553c51eac94d2ed6dd2be9c2701415d9 (patch) | |
tree | 3ec8a52b6975a2aac5a25e8c4c563f57ec3688da /sapi | |
parent | f027aef074cbf7d188a3631fe5e9f8c4d0dba2de (diff) | |
download | php-git-dfbc2245553c51eac94d2ed6dd2be9c2701415d9.tar.gz |
MFH
Diffstat (limited to 'sapi')
-rw-r--r-- | sapi/cli/php_cli.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index e7dcef33f3..192f8876a3 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -476,12 +476,6 @@ static void cli_register_file_handles(TSRMLS_D) s_out = php_stream_open_wrapper_ex("php://stdout", "wb", 0, NULL, sc_out); s_err = php_stream_open_wrapper_ex("php://stderr", "wb", 0, NULL, sc_err); -#if PHP_DEBUG - /* do not close stdout and stderr */ - s_out->flags |= PHP_STREAM_FLAG_NO_CLOSE; - s_err->flags |= PHP_STREAM_FLAG_NO_CLOSE; -#endif - if (s_in==NULL || s_out==NULL || s_err==NULL) { FREE_ZVAL(zin); FREE_ZVAL(zout); @@ -491,7 +485,13 @@ static void cli_register_file_handles(TSRMLS_D) if (s_err) php_stream_close(s_err); return; } - + +#if PHP_DEBUG + /* do not close stdout and stderr */ + s_out->flags |= PHP_STREAM_FLAG_NO_CLOSE; + s_err->flags |= PHP_STREAM_FLAG_NO_CLOSE; +#endif + s_in_process = s_in; php_stream_to_zval(s_in, zin); |