From: Igor Kulaychuk Date: Mon, 1 Oct 2018 11:19:40 +0000 (+0300) Subject: Move injection to realMain X-Git-Tag: submit/tizen/20181001.123900^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fe50c5d3f2f72fb9aeb16b706d928278641a03d8;p=platform%2Fcore%2Fdotnet%2Flauncher.git Move injection to realMain Change-Id: I33a114b0d1f524b922c4dc0f81bbfaac08168f6c --- diff --git a/NativeLauncher/launcher/main.cc b/NativeLauncher/launcher/main.cc index 78441e3..3db30b3 100644 --- a/NativeLauncher/launcher/main.cc +++ b/NativeLauncher/launcher/main.cc @@ -35,6 +35,14 @@ static std::string StandaloneOption("--standalone"); extern "C" int realMain(int argc, char *argv[], const char* mode) { + // checkInjection checks dotnet-launcher run mode, + // if it contains DOTNET_LAUNCHER_INJECT variable, it injects library. + // At the moment, this mechanism is used only when the Memory Profiler is started. + int res = checkInjection(); + if (res != 0) { + return 1; + } + int i; bool standaloneMode = false; char* standalonePath = nullptr; @@ -152,14 +160,5 @@ extern "C" int realMain(int argc, char *argv[], const char* mode) int main(int argc, char *argv[]) { - /* checkInjection checks dotnet-launcher run mode, - if it contains DOTNET_LAUNCHER_INJECT variable, it injects library. - At the moment, this mechanism is used only when the Memory Profiler is started. - */ - int res = checkInjection(); - if (res != 0) { - return 1; - } - return realMain(argc, argv, "default"); }