diff options
Diffstat (limited to 'sapi/cli/php_cli.c')
-rw-r--r-- | sapi/cli/php_cli.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index 45c3944a7a..6f6efb6dc5 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -501,6 +501,10 @@ static void cli_register_file_handles(TSRMLS_D) /* {{{ */ if (s_err) php_stream_close(s_err); return; } + + s_in->flags |= PHP_STREAM_FLAG_FCLOSE; + s_out->flags |= PHP_STREAM_FLAG_FCLOSE; + s_err->flags |= PHP_STREAM_FLAG_FCLOSE; #if PHP_DEBUG /* do not close stdout and stderr */ |