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

Issue 8574002: Handle stdin/stdout/stderr on Windows (Closed)

Created:
9 years, 1 month ago by Søren Gjesse
Modified:
9 years, 1 month ago
Reviewers:
Mads Ager (google)
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Handle stdin/stdout/stderr on Windows Create handle objects for stdin/stdout/stderr. For Mac OS and Linus the file descriptor numbers are used but on Windows the handles are wrapped in an object. The system handles for stdin/stdout/stderr on Windows does not support overlapped IO. To mittigate this the write calls are performed synchronously and the read calls are preformed in a thread which posts the result through the completion potr where it is handled as if it originated from overlapped IO through the completion port. For now each call to read starts a new thread. R=ager@google.com BUG= TEST= Committed: https://code.google.com/p/dart/source/detail?r=1533

Patch Set 1 #

Total comments: 6

Patch Set 2 : Addressed comments from ager@ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+155 lines, -36 lines) Patch
M runtime/bin/builtin.dart View 3 chunks +5 lines, -3 lines 0 comments Download
M runtime/bin/builtin_in.cc View 1 chunk +2 lines, -1 line 0 comments Download
M runtime/bin/eventhandler_win.h View 1 1 chunk +11 lines, -1 line 0 comments Download
M runtime/bin/eventhandler_win.cc View 1 4 chunks +85 lines, -28 lines 0 comments Download
M runtime/bin/process_win.cc View 2 chunks +2 lines, -3 lines 0 comments Download
M runtime/bin/socket.h View 1 chunk +1 line, -0 lines 0 comments Download
M runtime/bin/socket.cc View 1 chunk +14 lines, -0 lines 0 comments Download
M runtime/bin/socket_linux.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M runtime/bin/socket_macos.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M runtime/bin/socket_win.cc View 1 1 chunk +25 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Søren Gjesse
9 years, 1 month ago (2011-11-15 12:32:57 UTC) #1
Mads Ager (google)
LGTM http://codereview.chromium.org/8574002/diff/1/runtime/bin/eventhandler_win.cc File runtime/bin/eventhandler_win.cc (right): http://codereview.chromium.org/8574002/diff/1/runtime/bin/eventhandler_win.cc#newcode212 runtime/bin/eventhandler_win.cc:212: OVERLAPPED* overlapped = pending_read_->GetCleanOverlapped(); Move this to just ...
9 years, 1 month ago (2011-11-15 12:45:20 UTC) #2
Søren Gjesse
9 years, 1 month ago (2011-11-15 13:16:04 UTC) #3
http://codereview.chromium.org/8574002/diff/1/runtime/bin/eventhandler_win.cc
File runtime/bin/eventhandler_win.cc (right):

http://codereview.chromium.org/8574002/diff/1/runtime/bin/eventhandler_win.cc...
runtime/bin/eventhandler_win.cc:212: OVERLAPPED* overlapped =
pending_read_->GetCleanOverlapped();
On 2011/11/15 12:45:20, Mads Ager wrote:
> Move this to just before its use?

Done.

http://codereview.chromium.org/8574002/diff/1/runtime/bin/eventhandler_win.cc...
runtime/bin/eventhandler_win.cc:223: ok =
PostQueuedCompletionStatus(event_handler_->completion_port(),
On 2011/11/15 12:45:20, Mads Ager wrote:
> Funky indentation.

Done.

http://codereview.chromium.org/8574002/diff/1/runtime/bin/eventhandler_win.h
File runtime/bin/eventhandler_win.h (right):

http://codereview.chromium.org/8574002/diff/1/runtime/bin/eventhandler_win.h#...
runtime/bin/eventhandler_win.h:188: void MarkDontSupportOverlappedIO() {
On 2011/11/15 12:45:20, Mads Ager wrote:
> Dont -> DoesNot?

Done.

Powered by Google App Engine
This is Rietveld 408576698