mirror of
https://github.com/php/php-src.git
synced 2025-08-17 14:38:49 +02:00
implement PHP_STREAM_FLAG_NO_CLOSE and avoid hacks in plain wrapper
This commit is contained in:
parent
3305731054
commit
30dacafa72
4 changed files with 12 additions and 9 deletions
|
@ -487,6 +487,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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue