| Index: runtime/bin/main.cc
|
| diff --git a/runtime/bin/main.cc b/runtime/bin/main.cc
|
| index dacbb8feccd7dc5dc1a0947aa6fcf415495e9283..17aeaf009c6336395f5c855879d524ea21268e3b 100644
|
| --- a/runtime/bin/main.cc
|
| +++ b/runtime/bin/main.cc
|
| @@ -142,7 +142,7 @@ static void ErrorExit(int exit_code, const char* format, ...) {
|
| DebuggerConnectionHandler::StopHandler();
|
| EventHandler::Stop();
|
| }
|
| - exit(exit_code);
|
| + Platform::Exit(exit_code);
|
| }
|
|
|
|
|
| @@ -1116,12 +1116,12 @@ static void* LoadLibrarySymbol(const char* libname, const char* symname) {
|
| void* library = Extensions::LoadExtensionLibrary(libname);
|
| if (library == NULL) {
|
| Log::PrintErr("Error: Failed to load library '%s'\n", libname);
|
| - exit(kErrorExitCode);
|
| + Platform::Exit(kErrorExitCode);
|
| }
|
| void* symbol = Extensions::ResolveSymbol(library, symname);
|
| if (symbol == NULL) {
|
| Log::PrintErr("Error: Failed to load symbol '%s'\n", symname);
|
| - exit(kErrorExitCode);
|
| + Platform::Exit(kErrorExitCode);
|
| }
|
| return symbol;
|
| }
|
| @@ -1202,7 +1202,7 @@ bool RunMainIsolate(const char* script_name,
|
| DebuggerConnectionHandler::StopHandler();
|
| EventHandler::Stop();
|
| }
|
| - exit((exit_code != 0) ? exit_code : kErrorExitCode);
|
| + Platform::Exit((exit_code != 0) ? exit_code : kErrorExitCode);
|
| }
|
| delete [] isolate_name;
|
|
|
| @@ -1384,18 +1384,18 @@ void main(int argc, char** argv) {
|
| &verbose_debug_seen) < 0) {
|
| if (has_help_option) {
|
| PrintUsage();
|
| - exit(0);
|
| + Platform::Exit(0);
|
| } else if (has_version_option) {
|
| PrintVersion();
|
| - exit(0);
|
| + Platform::Exit(0);
|
| } else if (print_flags_seen) {
|
| // Will set the VM flags, print them out and then we exit as no
|
| // script was specified on the command line.
|
| Dart_SetVMFlags(vm_options.count(), vm_options.arguments());
|
| - exit(0);
|
| + Platform::Exit(0);
|
| } else {
|
| PrintUsage();
|
| - exit(kErrorExitCode);
|
| + Platform::Exit(kErrorExitCode);
|
| }
|
| }
|
|
|
| @@ -1405,7 +1405,7 @@ void main(int argc, char** argv) {
|
| OSError err;
|
| fprintf(stderr, "Error determining current directory: %s\n", err.message());
|
| fflush(stderr);
|
| - exit(kErrorExitCode);
|
| + Platform::Exit(kErrorExitCode);
|
| }
|
|
|
| if (generate_script_snapshot) {
|
| @@ -1455,7 +1455,7 @@ void main(int argc, char** argv) {
|
| fprintf(stderr, "VM initialization failed: %s\n", error);
|
| fflush(stderr);
|
| free(error);
|
| - exit(kErrorExitCode);
|
| + Platform::Exit(kErrorExitCode);
|
| }
|
|
|
| Dart_RegisterIsolateServiceRequestCallback(
|
| @@ -1497,7 +1497,7 @@ void main(int argc, char** argv) {
|
| delete environment;
|
| }
|
|
|
| - exit(Process::GlobalExitCode());
|
| + Platform::Exit(Process::GlobalExitCode());
|
| }
|
|
|
| } // namespace bin
|
|
|