| 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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 if (_closed) { | 139 if (_closed) { |
| 140 throw new ProcessException("Process closed"); | 140 throw new ProcessException("Process closed"); |
| 141 } | 141 } |
| 142 _in.close(); | 142 _in.close(); |
| 143 _out.close(); | 143 _out.close(); |
| 144 _err.close(); | 144 _err.close(); |
| 145 _exitHandler.close(); | 145 _exitHandler.close(); |
| 146 _closed = true; | 146 _closed = true; |
| 147 } | 147 } |
| 148 | 148 |
| 149 void setExitHandler(void callback(int exitCode)) { | 149 void set exitHandler(void callback(int exitCode)) { |
| 150 if (_closed) { | 150 if (_closed) { |
| 151 throw new ProcessException("Process closed"); | 151 throw new ProcessException("Process closed"); |
| 152 } | 152 } |
| 153 if (_killed) { | 153 if (_killed) { |
| 154 throw new ProcessException("Process killed"); | 154 throw new ProcessException("Process killed"); |
| 155 } | 155 } |
| 156 _exitHandlerCallback = callback; | 156 _exitHandlerCallback = callback; |
| 157 } | 157 } |
| 158 | 158 |
| 159 String _path; | 159 String _path; |
| 160 ObjectArray<String> _arguments; | 160 ObjectArray<String> _arguments; |
| 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 |