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

Issue 21816002: Add Process.runSync for running processe synchronously. (Closed)

Created:
7 years, 4 months ago by Anders Johnsen
Modified:
7 years, 4 months ago
CC:
reviews_dartlang.org, Anders Johnsen
Visibility:
Public.

Description

Add Process.runSync for running processes synchronously BUG=http://dartbug.com/1707 R=whesse@google.com Committed: https://code.google.com/p/dart/source/detail?r=26052

Patch Set 1 #

Patch Set 2 : Added Windows support #

Patch Set 3 : Linux and Mac OS #

Patch Set 4 : Fixed Mac OS issue #

Total comments: 9

Patch Set 5 : Addressed first round of comments #

Patch Set 6 : Add dart2js stub #

Patch Set 7 : Remove calls to Dart_EnterScope/Dart_ExitScope #

Patch Set 8 : Combined the code from https://codereview.chromium.org/22827002/ into this change #

Total comments: 26

Patch Set 9 : Addressed second round of comments #

Patch Set 10 : Rebased to r26045 #

Patch Set 11 : Fix Windows build #

Patch Set 12 : Fixed another Windows issue #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+894 lines, -70 lines) Patch
M runtime/bin/eventhandler_win.h View 1 2 3 4 5 6 7 8 8 chunks +22 lines, -21 lines 0 comments Download
M runtime/bin/eventhandler_win.cc View 1 2 3 4 5 6 7 27 chunks +53 lines, -49 lines 0 comments Download
M runtime/bin/io_buffer.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M runtime/bin/io_natives.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M runtime/bin/process.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +137 lines, -0 lines 0 comments Download
M runtime/bin/process.cc View 1 2 3 4 5 6 7 8 1 chunk +42 lines, -0 lines 0 comments Download
M runtime/bin/process_linux.cc View 1 2 3 4 5 6 7 8 2 chunks +121 lines, -0 lines 1 comment Download
M runtime/bin/process_macos.cc View 1 2 3 4 5 6 7 8 1 chunk +124 lines, -0 lines 0 comments Download
M runtime/bin/process_patch.dart View 4 chunks +79 lines, -0 lines 0 comments Download
M runtime/bin/process_win.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +195 lines, -0 lines 1 comment Download
M sdk/lib/_internal/lib/io_patch.dart View 1 2 3 4 5 6 7 8 9 1 chunk +12 lines, -0 lines 0 comments Download
M sdk/lib/io/process.dart View 1 2 3 1 chunk +20 lines, -0 lines 0 comments Download
A tests/standalone/io/process_sync_script.dart View 1 2 3 4 5 6 7 8 1 chunk +24 lines, -0 lines 0 comments Download
A tests/standalone/io/process_sync_test.dart View 1 2 3 4 5 6 7 8 1 chunk +63 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Søren Gjesse
7 years, 4 months ago (2013-08-09 13:44:15 UTC) #1
Bill Hesse
A first set of comments. https://codereview.chromium.org/21816002/diff/8001/runtime/bin/io_buffer.cc File runtime/bin/io_buffer.cc (right): https://codereview.chromium.org/21816002/diff/8001/runtime/bin/io_buffer.cc#newcode27 runtime/bin/io_buffer.cc:27: I see why it ...
7 years, 4 months ago (2013-08-09 15:32:23 UTC) #2
Søren Gjesse
https://codereview.chromium.org/21816002/diff/8001/runtime/bin/process_linux.cc File runtime/bin/process_linux.cc (right): https://codereview.chromium.org/21816002/diff/8001/runtime/bin/process_linux.cc#newcode629 runtime/bin/process_linux.cc:629: if (TEMP_FAILURE_RETRY(poll(fds, alive, -1)) <= 0) { On 2013/08/09 ...
7 years, 4 months ago (2013-08-12 06:52:38 UTC) #3
Søren Gjesse
On 2013/08/12 06:52:38, Søren Gjesse wrote: > https://codereview.chromium.org/21816002/diff/8001/runtime/bin/process_linux.cc > File runtime/bin/process_linux.cc (right): > > https://codereview.chromium.org/21816002/diff/8001/runtime/bin/process_linux.cc#newcode629 ...
7 years, 4 months ago (2013-08-12 12:29:28 UTC) #4
Søren Gjesse
Patch Set #8 now includes the changes in https://codereview.chromium.org/22827002/.
7 years, 4 months ago (2013-08-12 14:50:15 UTC) #5
Bill Hesse
LGTM, with comments. https://codereview.chromium.org/21816002/diff/34001/runtime/bin/eventhandler_win.h File runtime/bin/eventhandler_win.h (right): https://codereview.chromium.org/21816002/diff/34001/runtime/bin/eventhandler_win.h#newcode37 runtime/bin/eventhandler_win.h:37: // An IOBuffer encapsulates the OVERLAPPED ...
7 years, 4 months ago (2013-08-13 08:34:48 UTC) #6
Søren Gjesse
Landing when tested on Mac OS and Windows once more https://codereview.chromium.org/21816002/diff/34001/runtime/bin/eventhandler_win.h File runtime/bin/eventhandler_win.h (right): https://codereview.chromium.org/21816002/diff/34001/runtime/bin/eventhandler_win.h#newcode37 ...
7 years, 4 months ago (2013-08-13 13:00:38 UTC) #7
Søren Gjesse
Committed patchset #12 manually as r26052 (presubmit successful).
7 years, 4 months ago (2013-08-13 14:12:50 UTC) #8
Anders Johnsen
7 years, 4 months ago (2013-08-19 05:27:59 UTC) #9
Message was sent while issue was closed.
DBC

https://codereview.chromium.org/21816002/diff/52001/runtime/bin/process_linux.cc
File runtime/bin/process_linux.cc (right):

https://codereview.chromium.org/21816002/diff/52001/runtime/bin/process_linux...
runtime/bin/process_linux.cc:646: return CloseProcessBuffers(fds);
If we return here (or any other place after start, and before successfully
close), we'll not be calling BufferList::Free(). I think we should either

1) Always call Free on CloseProcessBuffers.
2) Always call Free on ~BufferList (I prefer this - double call should be fine).

https://codereview.chromium.org/21816002/diff/52001/runtime/bin/process_win.cc
File runtime/bin/process_win.cc (right):

https://codereview.chromium.org/21816002/diff/52001/runtime/bin/process_win.c...
runtime/bin/process_win.cc:786: OverlappedHandle oh[kHandles];
Best variable name ever! :)

Powered by Google App Engine
This is Rietveld 408576698