| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 }); | 250 }); |
| 251 } | 251 } |
| 252 | 252 |
| 253 if (mode is !ProcessStartMode) { | 253 if (mode is !ProcessStartMode) { |
| 254 throw new ArgumentError("Mode is not a ProcessStartMode: $mode"); | 254 throw new ArgumentError("Mode is not a ProcessStartMode: $mode"); |
| 255 } | 255 } |
| 256 _mode = mode; | 256 _mode = mode; |
| 257 | 257 |
| 258 if (mode != ProcessStartMode.DETACHED) { | 258 if (mode != ProcessStartMode.DETACHED) { |
| 259 // stdin going to process. | 259 // stdin going to process. |
| 260 _stdin = new _StdSocketSink(new _Socket._writePipe()); | 260 _stdin = new _StdSink(new _Socket._writePipe()); |
| 261 _stdin._sink._owner = this; | 261 _stdin._sink._owner = this; |
| 262 // stdout coming from process. | 262 // stdout coming from process. |
| 263 _stdout = new _StdStream(new _Socket._readPipe()); | 263 _stdout = new _StdStream(new _Socket._readPipe()); |
| 264 _stdout._stream._owner = this; | 264 _stdout._stream._owner = this; |
| 265 // stderr coming from process. | 265 // stderr coming from process. |
| 266 _stderr = new _StdStream(new _Socket._readPipe()); | 266 _stderr = new _StdStream(new _Socket._readPipe()); |
| 267 _stderr._stream._owner = this; | 267 _stderr._stream._owner = this; |
| 268 } | 268 } |
| 269 if (mode == ProcessStartMode.NORMAL) { | 269 if (mode == ProcessStartMode.NORMAL) { |
| 270 _exitHandler = new _Socket._readPipe(); | 270 _exitHandler = new _Socket._readPipe(); |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 515 } | 515 } |
| 516 | 516 |
| 517 int get pid => _ProcessUtils._pid(this); | 517 int get pid => _ProcessUtils._pid(this); |
| 518 | 518 |
| 519 String _path; | 519 String _path; |
| 520 List<String> _arguments; | 520 List<String> _arguments; |
| 521 String _workingDirectory; | 521 String _workingDirectory; |
| 522 List<String> _environment; | 522 List<String> _environment; |
| 523 ProcessStartMode _mode; | 523 ProcessStartMode _mode; |
| 524 // Private methods of Socket are used by _in, _out, and _err. | 524 // Private methods of Socket are used by _in, _out, and _err. |
| 525 _StdSocketSink _stdin; | 525 _StdSink _stdin; |
| 526 _StdStream _stdout; | 526 _StdStream _stdout; |
| 527 _StdStream _stderr; | 527 _StdStream _stderr; |
| 528 Socket _exitHandler; | 528 Socket _exitHandler; |
| 529 bool _ended; | 529 bool _ended; |
| 530 bool _started; | 530 bool _started; |
| 531 Completer<int> _exitCode; | 531 Completer<int> _exitCode; |
| 532 } | 532 } |
| 533 | 533 |
| 534 | 534 |
| 535 // _NonInteractiveProcess is a wrapper around an interactive process | 535 // _NonInteractiveProcess is a wrapper around an interactive process |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 595 Encoding stderrEncoding) { | 595 Encoding stderrEncoding) { |
| 596 var process = new _ProcessImpl(executable, | 596 var process = new _ProcessImpl(executable, |
| 597 arguments, | 597 arguments, |
| 598 workingDirectory, | 598 workingDirectory, |
| 599 environment, | 599 environment, |
| 600 includeParentEnvironment, | 600 includeParentEnvironment, |
| 601 runInShell, | 601 runInShell, |
| 602 ProcessStartMode.NORMAL); | 602 ProcessStartMode.NORMAL); |
| 603 return process._runAndWait(stdoutEncoding, stderrEncoding); | 603 return process._runAndWait(stdoutEncoding, stderrEncoding); |
| 604 } | 604 } |
| OLD | NEW |