Call plugin has log control before preloading (#483) accepted/tizen/8.0/unified/20231005.093328 accepted/tizen/unified/20230825.121024
author조웅석/MDE Lab(SR)/삼성전자 <ws77.cho@samsung.com>
Thu, 24 Aug 2023 06:58:23 +0000 (15:58 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Thu, 24 Aug 2023 06:58:23 +0000 (15:58 +0900)
* Call pluginHasLogControl in the initialize

VD create log thread in the pluginHasLogControl to redirect stdout,stderr to vlog.
To prevent log missing in the candidate process, call pluginHasLogControl in the initialize() function.

* call pluginHasLogControl before preloading

NativeLauncher/launcher/lib/core_runtime.cc

index af6ddad..ba874aa 100644 (file)
@@ -422,6 +422,11 @@ int CoreRuntime::initialize(const char* appType, LaunchMode launchMode)
                return -1;
        }
 
+       // VD has their own signal handler.
+       if (!pluginHasLogControl()) {
+               registerSigHandler();
+       }
+
        int st = createDelegate(__hostHandle, __domainId, "Tizen.Runtime", "Tizen.Runtime.Environment", "SetEnvironmentVariable", (void**)&setEnvironmentVariable);
        if (st < 0 || setEnvironmentVariable == nullptr) {
                _ERR("Create delegate for Tizen.Runtime.dll -> Tizen.Runtime.Environment -> SetEnvironmentVariable failed (0x%08x)", st);
@@ -452,11 +457,6 @@ int CoreRuntime::initialize(const char* appType, LaunchMode launchMode)
                removeDebugPipe();
        }
 
-       // VD has their own signal handler.
-       if (!pluginHasLogControl()) {
-               registerSigHandler();
-       }
-
        __initialized = true;
 
        _INFO("CoreRuntime initialize success");