OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 11 matching lines...) Expand all Loading... |
22 int len = arguments.length; | 22 int len = arguments.length; |
23 _arguments = new ObjectArray<String>(len); | 23 _arguments = new ObjectArray<String>(len); |
24 for (int i = 0; i < len; i++) { | 24 for (int i = 0; i < len; i++) { |
25 var arg = arguments[i]; | 25 var arg = arguments[i]; |
26 if (arg is !String) { | 26 if (arg is !String) { |
27 throw new ProcessException("Non-string argument: $arg"); | 27 throw new ProcessException("Non-string argument: $arg"); |
28 } | 28 } |
29 _arguments[i] = arguments[i]; | 29 _arguments[i] = arguments[i]; |
30 } | 30 } |
31 | 31 |
32 _in = new _Socket._internal(); | 32 _in = new _Socket._internalOutputOnly(); |
33 _out = new _Socket._internal(); | 33 _out = new _Socket._internalInputOnly(); |
34 _err = new _Socket._internal(); | 34 _err = new _Socket._internalOutputOnly(); |
35 _exitHandler = new _Socket._internal(); | 35 _exitHandler = new _Socket._internal(); |
36 _closed = false; | 36 _closed = false; |
37 _killed = false; | 37 _killed = false; |
38 _started = false; | 38 _started = false; |
39 _exitHandlerCallback = null; | 39 _exitHandlerCallback = null; |
40 } | 40 } |
41 | 41 |
42 void start() { | 42 void start() { |
43 var status = new _ProcessStartStatus(); | 43 var status = new _ProcessStartStatus(); |
44 bool success = _start( | 44 bool success = _start( |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 Socket _in; | 161 Socket _in; |
162 Socket _out; | 162 Socket _out; |
163 Socket _err; | 163 Socket _err; |
164 Socket _exitHandler; | 164 Socket _exitHandler; |
165 int _pid; | 165 int _pid; |
166 bool _closed; | 166 bool _closed; |
167 bool _killed; | 167 bool _killed; |
168 bool _started; | 168 bool _started; |
169 var _exitHandlerCallback; | 169 var _exitHandlerCallback; |
170 } | 170 } |
OLD | NEW |