| Index: runtime/bin/eventhandler_win.cc
|
| diff --git a/runtime/bin/eventhandler_win.cc b/runtime/bin/eventhandler_win.cc
|
| index 7c96ce88339311cd7978b0a451e2202a339880b3..f1257c3ce5054c900dbf047ba5ad14a4600be95e 100644
|
| --- a/runtime/bin/eventhandler_win.cc
|
| +++ b/runtime/bin/eventhandler_win.cc
|
| @@ -11,6 +11,8 @@
|
| #include <winsock2.h> // NOLINT
|
| #include <ws2tcpip.h> // NOLINT
|
| #include <mswsock.h> // NOLINT
|
| +#include <io.h> // NOLINT
|
| +#include <fcntl.h> // NOLINT
|
|
|
| #include "bin/builtin.h"
|
| #include "bin/dartutils.h"
|
| @@ -326,6 +328,18 @@ bool FileHandle::IsClosed() {
|
| }
|
|
|
|
|
| +void FileHandle::DoClose() {
|
| + if (GetStdHandle(STD_OUTPUT_HANDLE) == handle_) {
|
| + int fd = _open("NUL", _O_WRONLY);
|
| + ASSERT(fd >= 0);
|
| + _dup2(fd, _fileno(stdout));
|
| + close(fd);
|
| + } else {
|
| + Handle::DoClose();
|
| + }
|
| +}
|
| +
|
| +
|
| void SocketHandle::HandleIssueError() {
|
| int error = WSAGetLastError();
|
| if (error == WSAECONNRESET) {
|
|
|