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

Issue 10947031: Fix use of Process API in pub. (Closed)

Created:
8 years, 3 months ago by Mads Ager (google)
Modified:
8 years, 3 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Fix use of Process API in pub. This is subtle, but you have to wait for the process to be started before you can write to its stdin stream. You can register event handlers on the output streams if you want but you have to wait with writing to stdin. R=sgjesse@google.com,nweiz@google.com,rnystrom@google.com BUG=dartbug.com/5065 Committed: https://code.google.com/p/dart/source/detail?r=12559

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -12 lines) Patch
M utils/pub/io.dart View 2 chunks +11 lines, -9 lines 2 comments Download
M utils/tests/pub/pub.status View 1 chunk +0 lines, -3 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Mads Ager (google)
8 years, 3 months ago (2012-09-19 13:31:08 UTC) #1
Søren Gjesse
LGTM!
8 years, 3 months ago (2012-09-19 13:34:03 UTC) #2
Bob Nystrom
LGTM! Thanks for tracking this down!
8 years, 3 months ago (2012-09-19 16:12:26 UTC) #3
nweiz
https://codereview.chromium.org/10947031/diff/1/utils/pub/io.dart File utils/pub/io.dart (right): https://codereview.chromium.org/10947031/diff/1/utils/pub/io.dart#newcode594 utils/pub/io.dart:594: process.onError = completer.completeException; What happens if "tar" isn't found? ...
8 years, 3 months ago (2012-09-19 18:09:45 UTC) #4
Mads Ager (google)
8 years, 3 months ago (2012-09-20 06:16:26 UTC) #5
https://codereview.chromium.org/10947031/diff/1/utils/pub/io.dart
File utils/pub/io.dart (right):

https://codereview.chromium.org/10947031/diff/1/utils/pub/io.dart#newcode594
utils/pub/io.dart:594: process.onError = completer.completeException;
On 2012/09/19 18:09:45, nweiz wrote:
> What happens if "tar" isn't found? Will onStart fire, then onError? If not,
the
> completer will never fire.

Good catch, thanks! If the executable is not found only 'onError' will fire.
I'll move the onError and onExit handler registration out of onStart and commit
separately.

Powered by Google App Engine
This is Rietveld 408576698