| 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 17 matching lines...) Expand all Loading... |
| 28 InputStream get stderr(); | 28 InputStream get stderr(); |
| 29 | 29 |
| 30 /* | 30 /* |
| 31 * Returns an output stream to the process stdin. | 31 * Returns an output stream to the process stdin. |
| 32 */ | 32 */ |
| 33 OutputStream get stdin(); | 33 OutputStream get stdin(); |
| 34 | 34 |
| 35 /* | 35 /* |
| 36 * Sets an exit handler which gets invoked when the process terminates. | 36 * Sets an exit handler which gets invoked when the process terminates. |
| 37 */ | 37 */ |
| 38 void setExitHandler(void callback(int exitCode)); | 38 void set exitHandler(void callback(int exitCode)); |
| 39 | 39 |
| 40 /* | 40 /* |
| 41 * Kills the process with [signal]. | 41 * Kills the process with [signal]. |
| 42 */ | 42 */ |
| 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 this.message, int this.errorCode = 0]); |
| 54 String toString() => "ProcessException: $message"; | 54 String toString() => "ProcessException: $message"; |
| 55 | 55 |
| 56 /* | 56 /* |
| 57 * Contains the system message for the process exception if any. | 57 * Contains the system message for the process exception if any. |
| 58 */ | 58 */ |
| 59 final String message; | 59 final String message; |
| 60 | 60 |
| 61 /* | 61 /* |
| 62 * Contains the OS error code for the process exception if any. | 62 * Contains the OS error code for the process exception if any. |
| 63 */ | 63 */ |
| 64 final int errorCode; | 64 final int errorCode; |
| 65 } | 65 } |
| OLD | NEW |