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

Side by Side Diff: runtime/bin/process_impl.dart

Issue 10532024: Close stdin in Process.run. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 class _ProcessStartStatus { 5 class _ProcessStartStatus {
6 int _errorCode; // Set to OS error code if process start failed. 6 int _errorCode; // Set to OS error code if process start failed.
7 String _errorMessage; // Set to OS error message if process start failed. 7 String _errorMessage; // Set to OS error message if process start failed.
8 } 8 }
9 9
10 10
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 if (stderrEncoding is !Encoding) { 324 if (stderrEncoding is !Encoding) {
325 throw new IllegalArgumentException( 325 throw new IllegalArgumentException(
326 'stderrEncoding option is not an encoding: $stderrEncoding'); 326 'stderrEncoding option is not an encoding: $stderrEncoding');
327 } 327 }
328 } 328 }
329 } 329 }
330 330
331 // Start the underlying process. 331 // Start the underlying process.
332 _process = new _Process.start(path, arguments, options); 332 _process = new _Process.start(path, arguments, options);
333 333
334 // Make sure stdin is closed.
335 _process.onStart = _process.stdin.close;
336
334 // Setup process error handling. 337 // Setup process error handling.
335 _process.onError = (e) => _completer.completeException(e); 338 _process.onError = (e) => _completer.completeException(e);
336 339
337 // Setup process exit handling. 340 // Setup process exit handling.
338 _process.onExit = (exitCode) { 341 _process.onExit = (exitCode) {
339 _exitCode = exitCode; 342 _exitCode = exitCode;
340 _checkDone(); 343 _checkDone();
341 }; 344 };
342 345
343 // Setup stdout handling. 346 // Setup stdout handling.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 390
388 class _ProcessResult implements ProcessResult { 391 class _ProcessResult implements ProcessResult {
389 const _ProcessResult(int this.exitCode, 392 const _ProcessResult(int this.exitCode,
390 String this.stdout, 393 String this.stdout,
391 String this.stderr); 394 String this.stderr);
392 395
393 final int exitCode; 396 final int exitCode;
394 final String stdout; 397 final String stdout;
395 final String stderr; 398 final String stderr;
396 } 399 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698