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