| 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 interface Process factory _Process { | 5 interface Process factory _Process { |
| 6 /* | 6 /* |
| 7 * Creates a new process object preparing to run the executable | 7 * Creates a new process object preparing to run the executable |
| 8 * found at [path] with the specified [arguments]. | 8 * found at [path] with the specified [arguments]. |
| 9 */ | 9 */ |
| 10 Process(String path, List<String> arguments); | 10 Process(String path, List<String> arguments); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 bool kill(); | 43 bool kill(); |
| 44 | 44 |
| 45 /* | 45 /* |
| 46 * Terminates the streams and closes the exit handler of a process. | 46 * Terminates the streams and closes the exit handler of a process. |
| 47 */ | 47 */ |
| 48 void close(); | 48 void close(); |
| 49 } | 49 } |
| 50 | 50 |
| 51 | 51 |
| 52 class ProcessException implements Exception { | 52 class ProcessException implements Exception { |
| 53 const ProcessException([String this.message, int this.errorCode = 0]); | 53 const ProcessException([String message, int errorCode = 0]) |
| 54 : this.message = message, this.errorCode = errorCode; |
| 54 String toString() => "ProcessException: $message"; | 55 String toString() => "ProcessException: $message"; |
| 55 | 56 |
| 56 /* | 57 /* |
| 57 * Contains the system message for the process exception if any. | 58 * Contains the system message for the process exception if any. |
| 58 */ | 59 */ |
| 59 final String message; | 60 final String message; |
| 60 | 61 |
| 61 /* | 62 /* |
| 62 * Contains the OS error code for the process exception if any. | 63 * Contains the OS error code for the process exception if any. |
| 63 */ | 64 */ |
| 64 final int errorCode; | 65 final int errorCode; |
| 65 } | 66 } |
| OLD | NEW |