| 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 /** Exit the Dart VM process with the given [status] code. */ | 5 /** Exit the Dart VM process with the given [status] code. */ |
| 6 void exit(int status) { | 6 void exit(int status) { |
| 7 if (status is !int) { | 7 if (status is !int) { |
| 8 throw new IllegalArgumentException("int status expected"); | 8 throw new IllegalArgumentException("int status expected"); |
| 9 } | 9 } |
| 10 _exit(status); | 10 _exit(status); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 * When the process has been successfully started [onStart] is | 26 * When the process has been successfully started [onStart] is |
| 27 * called on the returned Process object. If the process fails to | 27 * called on the returned Process object. If the process fails to |
| 28 * start [onError] is called on the returned Process object. | 28 * start [onError] is called on the returned Process object. |
| 29 * | 29 * |
| 30 * No data can be written to the process stdin and the process | 30 * No data can be written to the process stdin and the process |
| 31 * cannot be closed nor killed before [onStart] has been invoked. | 31 * cannot be closed nor killed before [onStart] has been invoked. |
| 32 */ | 32 */ |
| 33 static Process start(String executable, | 33 static Process start(String executable, |
| 34 List<String> arguments, | 34 List<String> arguments, |
| 35 [ProcessOptions options]) { | 35 [ProcessOptions options]) { |
| 36 return _Process.start(executable, arguments, options); | 36 return new _Process.start(executable, arguments, options); |
| 37 } | 37 } |
| 38 | 38 |
| 39 /** | 39 /** |
| 40 * Starts a process and runs it non-interactively to completion. The | 40 * Starts a process and runs it non-interactively to completion. The |
| 41 * process run is [executable] with the specified [arguments]. | 41 * process run is [executable] with the specified [arguments]. |
| 42 * | 42 * |
| 43 * An optional [ProcessOptions] object can be passed to specify | 43 * An optional [ProcessOptions] object can be passed to specify |
| 44 * options other than the executable and the arguments. | 44 * options other than the executable and the arguments. |
| 45 * | 45 * |
| 46 * Returns a [:Future<ProcessResult>:] that completes with the | 46 * Returns a [:Future<ProcessResult>:] that completes with the |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 /** | 235 /** |
| 236 * Contains the system message for the process exception if any. | 236 * Contains the system message for the process exception if any. |
| 237 */ | 237 */ |
| 238 final String message; | 238 final String message; |
| 239 | 239 |
| 240 /** | 240 /** |
| 241 * Contains the OS error code for the process exception if any. | 241 * Contains the OS error code for the process exception if any. |
| 242 */ | 242 */ |
| 243 final int errorCode; | 243 final int errorCode; |
| 244 } | 244 } |
| OLD | NEW |