Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1131)

Side by Side Diff: runtime/bin/process.dart

Issue 10166029: Support passing an environment variable map to child processes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/bin/process.cc ('k') | runtime/bin/process_impl.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « runtime/bin/process.cc ('k') | runtime/bin/process_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698