Call pluginHasLogControl in the initialize
authorWoongsuk Cho <ws77.cho@samsung.com>
Thu, 24 Aug 2023 06:36:16 +0000 (15:36 +0900)
committer조웅석/MDE Lab(SR)/삼성전자 <ws77.cho@samsung.com>
Thu, 24 Aug 2023 06:44:22 +0000 (15:44 +0900)
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.

NativeLauncher/launcher/lib/core_runtime.cc

index b03b204..af6ddad 100644 (file)
@@ -452,7 +452,10 @@ int CoreRuntime::initialize(const char* appType, LaunchMode launchMode)
                removeDebugPipe();
        }
 
-
+       // VD has their own signal handler.
+       if (!pluginHasLogControl()) {
+               registerSigHandler();
+       }
 
        __initialized = true;
 
@@ -520,11 +523,6 @@ int CoreRuntime::launch(const char* appId, const char* root, const char* path, i
                return -1;
        }
 
-       // VD has their own signal handler.
-       if (!pluginHasLogControl()) {
-               registerSigHandler();
-       }
-
        pluginSetAppInfo(appId, path);
 
        // temporal root path is overrided to real application root path