| 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 /** | 134 /** |
| 135 * The encoding used for text on stderr when starting a | 135 * The encoding used for text on stderr when starting a |
| 136 * non-interactive process with [:Process.run:]. | 136 * non-interactive process with [:Process.run:]. |
| 137 * | 137 * |
| 138 * This option is ignored for interactive processes started with | 138 * This option is ignored for interactive processes started with |
| 139 * [:Process.start:]. | 139 * [:Process.start:]. |
| 140 * | 140 * |
| 141 * The default stderrEncoding is UTF_8. | 141 * The default stderrEncoding is UTF_8. |
| 142 */ | 142 */ |
| 143 Encoding stderrEncoding; | 143 Encoding stderrEncoding; |
| 144 | |
| 145 /** | |
| 146 * Provides the environment variables for the process. If not set | |
| 147 * the environment of the parent process is inherited. | |
| 148 * | |
| 149 * Currently, only ASCII environment variables are supported and | |
| 150 * errors are likely to occur if an environment variables with | |
| 151 * code-points outside the ASCII range is passed in. | |
| 152 */ | |
| 153 Map<String, String> environment; | |
| 154 } | 144 } |
| 155 | 145 |
| 156 | 146 |
| 157 class ProcessException implements Exception { | 147 class ProcessException implements Exception { |
| 158 const ProcessException([String this.message, int this.errorCode = 0]); | 148 const ProcessException([String this.message, int this.errorCode = 0]); |
| 159 String toString() => "ProcessException: $message"; | 149 String toString() => "ProcessException: $message"; |
| 160 | 150 |
| 161 /** | 151 /** |
| 162 * Contains the system message for the process exception if any. | 152 * Contains the system message for the process exception if any. |
| 163 */ | 153 */ |
| 164 final String message; | 154 final String message; |
| 165 | 155 |
| 166 /** | 156 /** |
| 167 * Contains the OS error code for the process exception if any. | 157 * Contains the OS error code for the process exception if any. |
| 168 */ | 158 */ |
| 169 final int errorCode; | 159 final int errorCode; |
| 170 } | 160 } |
| OLD | NEW |