Index: runtime/bin/file_win.cc |
diff --git a/runtime/bin/file_win.cc b/runtime/bin/file_win.cc |
index 62e7961f84e92a7161ec996e91ad08e34e619867..67b97f51af1698240c70f839c7235728c0382a68 100644 |
--- a/runtime/bin/file_win.cc |
+++ b/runtime/bin/file_win.cc |
@@ -45,7 +45,7 @@ File::~File() { |
void File::Close() { |
ASSERT(handle_->fd() >= 0); |
- if (handle_->fd() == _fileno(stdout)) { |
+ if (handle_->fd() == _fileno(stdout) || handle_->fd() == _fileno(stderr)) { |
int fd = _open("NUL", _O_WRONLY); |
ASSERT(fd >= 0); |
_dup2(fd, handle_->fd()); |