Modify setting environment variable 66/295966/2
authorHwankyu Jhun <h.jhun@samsung.com>
Tue, 18 Jul 2023 02:19:33 +0000 (11:19 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Tue, 18 Jul 2023 02:27:43 +0000 (11:27 +0900)
If TIZEN_GLIB_CONTEXT already exists, the launchpad library does not set it to
zero. Unfortunately, the launchpad library overwrites the environment variable
even if the process is the candidate process as like dotnet loader.

Change-Id: I3c1667627ac0955a422f96cc6b9264cbf05115ec
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/lib/launchpad-glib/util.cc

index 700eeca..f2588be 100644 (file)
@@ -364,7 +364,9 @@ void Util::SetEnvironments(const AppInfo* app_info) {
     setenv("TIZEN_API_VERSION", value.c_str(), 1);
 
   setenv("AUL_PID", std::to_string(getpid()).c_str(), 1);
-  setenv("TIZEN_GLIB_CONTEXT", "0", 1);
+
+  if (getenv("TIZEN_GLIB_CONTEXT") == nullptr)
+    setenv("TIZEN_GLIB_CONTEXT", "0", 1);
 
   SetLanguageEnvironments();
   SetRegionFormatEnvironments();