Chromium Code Reviews| Index: sdk/lib/io/process.dart |
| diff --git a/sdk/lib/io/process.dart b/sdk/lib/io/process.dart |
| index 828145e8304bce61369dd94fedfcd0ba7b80ab04..a1ef67119a9ea69e210c6c4845c720662f1e9fdb 100644 |
| --- a/sdk/lib/io/process.dart |
| +++ b/sdk/lib/io/process.dart |
| @@ -9,6 +9,7 @@ part of dart.io; |
| class _ProcessUtils { |
| external static void _exit(int status); |
| external static void _setExitCode(int status); |
| + external static int _getExitCode(); |
| external static void _sleep(int millis); |
| external static int _pid(Process process); |
| external static Stream<ProcessSignal> _watchSignal(ProcessSignal signal); |
| @@ -49,7 +50,7 @@ void exit(int code) { |
| } |
| /** |
| - * Global exit code for the Dart VM. |
| + * Set the global exit code for the Dart VM. |
| * |
| * The exit code is global for the Dart VM and the last assignment to |
| * exitCode from any isolate determines the exit code of the Dart VM |
| @@ -65,6 +66,18 @@ set exitCode(int code) { |
| _ProcessUtils._setExitCode(code); |
| } |
| +/* |
| + * Get the global exit code for the Dart VM. |
| + * |
| + * The exit code is global for the Dart VM and the last assignment to |
| + * exitCode from any isolate determines the exit code of the Dart VM |
| + * on normal termination. |
| + * |
| + * See [exit] for more information on how to chose a value for the |
| + * exit code. |
| + */ |
| +get exitCode => _ProcessUtils._getExitCode(); |
|
Søren Gjesse
2014/03/14 12:04:49
Add return type.
Anders Johnsen
2014/03/17 10:40:06
Done.
|
| + |
| /** |
| * Sleep for the duration specified in [duration]. |
| * |