From fdfbfb96a14f46aa7ff457d97e713725c0e69e32 Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Tue, 22 Jul 2008 14:09:24 +0000 Subject: - MFH: Fixed bug #44246 (closedir() accepts a file resource opened by fopen()) --- sapi/cli/php_cli.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sapi/cli/php_cli.c') 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 */ -- cgit v1.2.1