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

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

Issue 11614024: Fix closing of process stdin on Process.run. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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 patch class _WindowsCodePageDecoder { 5 patch class _WindowsCodePageDecoder {
6 /* patch */ static String _decodeBytes(List<int> bytes) 6 /* patch */ static String _decodeBytes(List<int> bytes)
7 native "SystemEncodingToString"; 7 native "SystemEncodingToString";
8 } 8 }
9 9
10 10
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 'stderrEncoding option is not an encoding: $stderrEncoding'); 307 'stderrEncoding option is not an encoding: $stderrEncoding');
308 } 308 }
309 } 309 }
310 } 310 }
311 311
312 // Start the underlying process. 312 // Start the underlying process.
313 var processFuture = new _ProcessImpl(path, arguments, options)._start(); 313 var processFuture = new _ProcessImpl(path, arguments, options)._start();
314 314
315 processFuture.then((Process p) { 315 processFuture.then((Process p) {
316 // Make sure the process stdin is closed. 316 // Make sure the process stdin is closed.
317 p.stdin.close; 317 p.stdin.close();
Søren Gjesse 2012/12/18 07:38:44 Oops.
318 318
319 // Setup process exit handling. 319 // Setup process exit handling.
320 p.onExit = (exitCode) { 320 p.onExit = (exitCode) {
321 _exitCode = exitCode; 321 _exitCode = exitCode;
322 _checkDone(); 322 _checkDone();
323 }; 323 };
324 324
325 // Setup stdout handling. 325 // Setup stdout handling.
326 _stdoutBuffer = new StringBuffer(); 326 _stdoutBuffer = new StringBuffer();
327 var stdoutStream = new StringInputStream(p.stdout, stdoutEncoding); 327 var stdoutStream = new StringInputStream(p.stdout, stdoutEncoding);
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 374
375 class _ProcessResult implements ProcessResult { 375 class _ProcessResult implements ProcessResult {
376 const _ProcessResult(int this.exitCode, 376 const _ProcessResult(int this.exitCode,
377 String this.stdout, 377 String this.stdout,
378 String this.stderr); 378 String this.stderr);
379 379
380 final int exitCode; 380 final int exitCode;
381 final String stdout; 381 final String stdout;
382 final String stderr; 382 final String stderr;
383 } 383 }
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