From: 조웅석/Common Platform Lab(SR)/Principal Engineer/삼성전자 Date: Mon, 27 Dec 2021 08:19:11 +0000 (+0900) Subject: change dll/so searching path for app (#356) X-Git-Tag: submit/tizen/20220110.045001~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=45977f619f57e63f9efd64e8fbb480823020fe6b;p=platform%2Fcore%2Fdotnet%2Flauncher.git change dll/so searching path for app (#356) Change the path "/proc/self/fd/bin" used to find dll/so for the candidate process to "/proc/[pid]/fd/bin" When debugging, the library loaded in the location of "/proc/self/fd/bin" cannot be accessed by the debugger, so symbol loading fails. To avoid this failure, change finding path to "/proc/[pid]/fd/bin". --- diff --git a/NativeLauncher/util/path_manager.cc b/NativeLauncher/util/path_manager.cc index 97db862..6ecd556 100644 --- a/NativeLauncher/util/path_manager.cc +++ b/NativeLauncher/util/path_manager.cc @@ -101,8 +101,10 @@ PathManager::PathManager() : throw std::ios_base::failure("Fail to open /proc/self"); } - appRootPath = std::string("/proc/self/fd/") + std::to_string(rootFD); - appNIRootPath = std::string("/proc/self/fd/") + std::to_string(niRootFD); + std::string fdPath = "/proc/" + std::to_string(getpid()) + "/fd/"; + appRootPath = fdPath + std::to_string(rootFD); + appNIRootPath = fdPath + std::to_string(niRootFD); + updateAppRelatedPath(appRootPath, appNIRootPath); // Set native library searching path