| OLD | NEW |
| 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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 return; | 234 return; |
| 235 } | 235 } |
| 236 // TODO(ager): Make the actual kill operation asynchronous. | 236 // TODO(ager): Make the actual kill operation asynchronous. |
| 237 if (_kill(_pid, signal._signalNumber)) { | 237 if (_kill(_pid, signal._signalNumber)) { |
| 238 return; | 238 return; |
| 239 } | 239 } |
| 240 _reportError(new ProcessException("Could not kill process")); | 240 _reportError(new ProcessException("Could not kill process")); |
| 241 return; | 241 return; |
| 242 } | 242 } |
| 243 | 243 |
| 244 void _kill(int pid, int signal) native "Process_Kill"; | 244 bool _kill(int pid, int signal) native "Process_Kill"; |
| 245 | 245 |
| 246 void close() { | 246 void close() { |
| 247 if (_closed) { | 247 if (_closed) { |
| 248 throw new ProcessException("Process closed"); | 248 throw new ProcessException("Process closed"); |
| 249 } | 249 } |
| 250 _in.close(); | 250 _in.close(); |
| 251 _out.close(); | 251 _out.close(); |
| 252 _err.close(); | 252 _err.close(); |
| 253 _exitHandler.close(); | 253 _exitHandler.close(); |
| 254 _closed = true; | 254 _closed = true; |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 | 390 |
| 391 class _ProcessResult implements ProcessResult { | 391 class _ProcessResult implements ProcessResult { |
| 392 const _ProcessResult(int this.exitCode, | 392 const _ProcessResult(int this.exitCode, |
| 393 String this.stdout, | 393 String this.stdout, |
| 394 String this.stderr); | 394 String this.stderr); |
| 395 | 395 |
| 396 final int exitCode; | 396 final int exitCode; |
| 397 final String stdout; | 397 final String stdout; |
| 398 final String stderr; | 398 final String stderr; |
| 399 } | 399 } |
| OLD | NEW |