| 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 /** | 5 /** |
| 6 * [Process] objects are used to start new processes and interact with | 6 * [Process] objects are used to start new processes and interact with |
| 7 * them. | 7 * them. |
| 8 */ | 8 */ |
| 9 interface Process default _Process { | 9 interface Process default _Process { |
| 10 /** | 10 /** |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 * | 80 * |
| 81 * Throws an [UnsupportedOperationException] if the process is | 81 * Throws an [UnsupportedOperationException] if the process is |
| 82 * non-interactive. | 82 * non-interactive. |
| 83 */ | 83 */ |
| 84 void set onExit(void callback(int exitCode)); | 84 void set onExit(void callback(int exitCode)); |
| 85 | 85 |
| 86 /** | 86 /** |
| 87 * Set an error handler which gets invoked if an operation on the process | 87 * Set an error handler which gets invoked if an operation on the process |
| 88 * fails. | 88 * fails. |
| 89 */ | 89 */ |
| 90 void set onError(void callback(ProcessException error)); | 90 void set onError(void callback(e)); |
| 91 | 91 |
| 92 /** | 92 /** |
| 93 * Kills the process. When the process terminates as a result of | 93 * Kills the process. When the process terminates as a result of |
| 94 * calling [kill] [onExit] is called. If the kill operation fails, | 94 * calling [kill] [onExit] is called. If the kill operation fails, |
| 95 * [onError] is called. | 95 * [onError] is called. |
| 96 */ | 96 */ |
| 97 void kill(); | 97 void kill(); |
| 98 | 98 |
| 99 /** | 99 /** |
| 100 * Terminates the streams of a process. [close] most be called on a | 100 * Terminates the streams of a process. [close] most be called on a |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 /** | 161 /** |
| 162 * Contains the system message for the process exception if any. | 162 * Contains the system message for the process exception if any. |
| 163 */ | 163 */ |
| 164 final String message; | 164 final String message; |
| 165 | 165 |
| 166 /** | 166 /** |
| 167 * Contains the OS error code for the process exception if any. | 167 * Contains the OS error code for the process exception if any. |
| 168 */ | 168 */ |
| 169 final int errorCode; | 169 final int errorCode; |
| 170 } | 170 } |
| OLD | NEW |