Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(633)

Unified Diff: runtime/bin/file_win.cc

Issue 2204953002: Don't close stdio/stderr when shutting down. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Add comment. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/file_macos.cc ('k') | tests/standalone/io/stdio_implicit_close_script.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/file_win.cc
diff --git a/runtime/bin/file_win.cc b/runtime/bin/file_win.cc
index 8d45a177dec65a4935ba03d95d451d29f2cd6868..f487a889b885676dfbb79d73d280ce289b0ed7fa 100644
--- a/runtime/bin/file_win.cc
+++ b/runtime/bin/file_win.cc
@@ -38,7 +38,8 @@ class FileHandle {
File::~File() {
- if (!IsClosed()) {
+ if (!IsClosed() &&
+ handle_->fd() != _fileno(stdout) && handle_->fd() != _fileno(stderr)) {
Close();
}
delete handle_;
« no previous file with comments | « runtime/bin/file_macos.cc ('k') | tests/standalone/io/stdio_implicit_close_script.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698