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

Unified Diff: runtime/bin/file_linux.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.cc ('k') | runtime/bin/file_macos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/file_linux.cc
diff --git a/runtime/bin/file_linux.cc b/runtime/bin/file_linux.cc
index eab92d5361ea847ad8e7b8064a6d47c9f86bdecf..4f61db1d306b3415c629dea7a2f3f10b6564b015 100644
--- a/runtime/bin/file_linux.cc
+++ b/runtime/bin/file_linux.cc
@@ -39,7 +39,8 @@ class FileHandle {
File::~File() {
- if (!IsClosed()) {
+ if (!IsClosed() &&
+ handle_->fd() != STDOUT_FILENO && handle_->fd() != STDERR_FILENO) {
Close();
}
delete handle_;
« no previous file with comments | « runtime/bin/file.cc ('k') | runtime/bin/file_macos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698