Revert PR #509, #510 (#513)
[platform/core/dotnet/launcher.git] / NativeLauncher / launcher / lib / core_runtime.cc
index b03b204..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,8 +457,6 @@ int CoreRuntime::initialize(const char* appType, LaunchMode launchMode)
                removeDebugPipe();
        }
 
-
-
        __initialized = true;
 
        _INFO("CoreRuntime initialize success");
@@ -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