From: Petr Bred Date: Fri, 28 Sep 2018 10:16:34 +0000 (+0300) Subject: Refactoring and add detail comments X-Git-Tag: submit/tizen/20181001.123900~2^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8d528a44de9255383d74aefc1eb5ca701d7e58be;p=platform%2Fcore%2Fdotnet%2Flauncher.git Refactoring and add detail comments Signed-off-by: Petr Bred --- diff --git a/NativeLauncher/launcher/injection.cc b/NativeLauncher/launcher/injection.cc index 31134f6..5e18e90 100644 --- a/NativeLauncher/launcher/injection.cc +++ b/NativeLauncher/launcher/injection.cc @@ -51,7 +51,7 @@ ret: return res; } -int doInjection() +int checkInjection() { int res = -1; char *env = nullptr; diff --git a/NativeLauncher/launcher/injection.h b/NativeLauncher/launcher/injection.h index 3a08992..6bcf111 100644 --- a/NativeLauncher/launcher/injection.h +++ b/NativeLauncher/launcher/injection.h @@ -17,6 +17,6 @@ #ifndef __INJETION_INTERFACE_H__ #define __INJETION_INTERFACE_H__ -int doInjection(); +int checkInjection(); #endif // __INJETION_INTERFACE_H__ diff --git a/NativeLauncher/launcher/main.cc b/NativeLauncher/launcher/main.cc index c11c423..78441e3 100644 --- a/NativeLauncher/launcher/main.cc +++ b/NativeLauncher/launcher/main.cc @@ -152,7 +152,11 @@ extern "C" int realMain(int argc, char *argv[], const char* mode) int main(int argc, char *argv[]) { - int res = doInjection(); + /* 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; }