diff options
author | Antony Dovgal <tony2001@php.net> | 2007-02-21 21:57:21 +0000 |
---|---|---|
committer | Antony Dovgal <tony2001@php.net> | 2007-02-21 21:57:21 +0000 |
commit | 4a95928d1dc9c22f2f772c9136581a410efa573c (patch) | |
tree | 3d4ef7e7655d9ee2e357e26c182f07adab2bb70b /sapi | |
parent | 2a019a14bf221d71ccea072abec95d5288521ca3 (diff) | |
download | php-git-4a95928d1dc9c22f2f772c9136581a410efa573c.tar.gz |
MFH: implement PHP_STREAM_FLAG_NO_CLOSE and avoid hacks
Diffstat (limited to 'sapi')
-rw-r--r-- | sapi/cli/php_cli.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index 71e13f26d0..e7dcef33f3 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -476,6 +476,12 @@ 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); |