| 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; |
| 144 } | 154 } |
| 145 | 155 |
| 146 | 156 |
| 147 class ProcessException implements Exception { | 157 class ProcessException implements Exception { |
| 148 const ProcessException([String this.message, int this.errorCode = 0]); | 158 const ProcessException([String this.message, int this.errorCode = 0]); |
| 149 String toString() => "ProcessException: $message"; | 159 String toString() => "ProcessException: $message"; |
| 150 | 160 |
| 151 /** | 161 /** |
| 152 * Contains the system message for the process exception if any. | 162 * Contains the system message for the process exception if any. |
| 153 */ | 163 */ |
| 154 final String message; | 164 final String message; |
| 155 | 165 |
| 156 /** | 166 /** |
| 157 * Contains the OS error code for the process exception if any. | 167 * Contains the OS error code for the process exception if any. |
| 158 */ | 168 */ |
| 159 final int errorCode; | 169 final int errorCode; |
| 160 } | 170 } |
| OLD | NEW |