| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 part of dart.io; | 5 part of dart.io; |
| 6 | 6 |
| 7 // TODO(ager): The only reason for this class is that we | 7 // TODO(ager): The only reason for this class is that we |
| 8 // cannot patch a top-level at this point. | 8 // cannot patch a top-level at this point. |
| 9 class _ProcessUtils { | 9 class _ProcessUtils { |
| 10 external static _exit(int status); | 10 external static _exit(int status); |
| 11 external static _setExitCode(int status); | 11 external static _setExitCode(int status); |
| 12 external static _sleep(int status); | 12 external static _sleep(int millis); |
| 13 } | 13 } |
| 14 | 14 |
| 15 /** | 15 /** |
| 16 * Exit the Dart VM process immediately with the given [status] code. | 16 * Exit the Dart VM process immediately with the given [status] code. |
| 17 * | 17 * |
| 18 * This does not wait for any asynchronous operations to terminate. Using | 18 * This does not wait for any asynchronous operations to terminate. Using |
| 19 * [exit] is therefore very likely to lose data. | 19 * [exit] is therefore very likely to lose data. |
| 20 */ | 20 */ |
| 21 void exit(int status) { | 21 void exit(int status) { |
| 22 if (status is !int) { | 22 if (status is !int) { |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 /** | 270 /** |
| 271 * Contains the system message for the process exception if any. | 271 * Contains the system message for the process exception if any. |
| 272 */ | 272 */ |
| 273 final String message; | 273 final String message; |
| 274 | 274 |
| 275 /** | 275 /** |
| 276 * Contains the OS error code for the process exception if any. | 276 * Contains the OS error code for the process exception if any. |
| 277 */ | 277 */ |
| 278 final int errorCode; | 278 final int errorCode; |
| 279 } | 279 } |
| OLD | NEW |