summaryrefslogtreecommitdiff
path: root/sapi/cli/php_cli.c
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2008-07-22 14:09:24 +0000
committerFelipe Pena <felipe@php.net>2008-07-22 14:09:24 +0000
commitfdfbfb96a14f46aa7ff457d97e713725c0e69e32 (patch)
tree966f191df49221395fdda380b986c8e210dab797 /sapi/cli/php_cli.c
parentcb3bc158076026430722bb408c736496b1c88277 (diff)
downloadphp-git-fdfbfb96a14f46aa7ff457d97e713725c0e69e32.tar.gz
- MFH: Fixed bug #44246 (closedir() accepts a file resource opened by fopen())
Diffstat (limited to 'sapi/cli/php_cli.c')
-rw-r--r--sapi/cli/php_cli.c4
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 */