diff options
author | Petr Bred <p.bred@samsung.com> | 2018-09-28 13:16:34 +0300 |
---|---|---|
committer | Petr Bred <p.bred@samsung.com> | 2018-09-28 13:16:34 +0300 |
commit | 8d528a44de9255383d74aefc1eb5ca701d7e58be (patch) | |
tree | 1e9766a02f8d95375b689567f0fce39e4f86956f | |
parent | f83e650eefade65c1799e54f4cc693cd873e6660 (diff) | |
download | launcher-8d528a44de9255383d74aefc1eb5ca701d7e58be.tar.gz launcher-8d528a44de9255383d74aefc1eb5ca701d7e58be.tar.bz2 launcher-8d528a44de9255383d74aefc1eb5ca701d7e58be.zip |
Refactoring and add detail comments
Signed-off-by: Petr Bred <p.bred@samsung.com>
-rw-r--r-- | NativeLauncher/launcher/injection.cc | 2 | ||||
-rw-r--r-- | NativeLauncher/launcher/injection.h | 2 | ||||
-rw-r--r-- | NativeLauncher/launcher/main.cc | 6 |
3 files changed, 7 insertions, 3 deletions
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; } |