From: pius.lee Date: Mon, 1 Aug 2016 01:28:03 +0000 (+0900) Subject: fix unreleased exit and errata in ini X-Git-Tag: submit/tizen/20161214.063015~29 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=83e921d9e434f05b195303628dbc171546805a10;p=platform%2Fcore%2Fdotnet%2Flauncher.git fix unreleased exit and errata in ini --- diff --git a/packaging/dotnet-launcher.ini b/packaging/dotnet-launcher.ini index 8b8204b..dae9223 100644 --- a/packaging/dotnet-launcher.ini +++ b/packaging/dotnet-launcher.ini @@ -1,5 +1,5 @@ [dotnet] libcoreclr = libcoreclr.so coreclr_dir = /usr/share/dotnet/shared/Microsoft.NETCore.App/1.0.0 -tpa_dirs = /usr/share/dotnet/shared/Microsoft.NETCore.App/1.0.0:/usr/share/assemblies -native_so_search_dirs = /usr/share/dotnet/shared/Microsoft.NETCore.App/1.0.0:/usr/share/assemblies +tpa_dirs = /usr/share/dotnet/shared/Microsoft.NETCore.App/1.0.0:/usr/share/assembly +native_so_search_dirs = /usr/share/dotnet/shared/Microsoft.NETCore.App/1.0.0:/usr/share/assembly diff --git a/src/launcher.cc b/src/launcher.cc index 66bc440..088f1be 100644 --- a/src/launcher.cc +++ b/src/launcher.cc @@ -239,14 +239,6 @@ void Launcher::Initialize() } } -void Launcher::Dispose() -{ - if (dlclose(coreclrLib) != 0) - { - _ERR("libcoreclr.so close failed"); - } -} - void Launcher::Launch(const string& exe_path, int argc, char *argv[]) { std::string bin_path = Basename(AbsolutePath(exe_path)); @@ -299,26 +291,28 @@ void Launcher::Launch(const string& exe_path, int argc, char *argv[]) // initialize coreclr fail _ERR("initialize core clr fail! (0x%08x)", st); _DBG("check your smack label dll and every directories on the way to dlls"); - exit(-1); } - - unsigned int exitCode; - st = executeAssembly(hostHandle, domainId, - argc, const_cast(argv), exe_path.c_str(), &exitCode); - if (st < 0) + else { - // execute coreclr fail - _ERR("execute core clr fail! (0x%08x)", st); - exit(-1); + unsigned int exitCode; + const char** argvc = const_cast(argv); + st = executeAssembly(hostHandle, domainId, argc, argvc, exe_path.c_str(), &exitCode); + _DBG("after execute coreclr"); + if (st < 0) + { + // execute coreclr fail + _ERR("execute core clr fail! (0x%08x / %d)", st, exitCode); + } + st = shutdownCoreCLR(hostHandle, domainId); + if (st < 0) + { + // shutdown fail + _ERR("shutdown core clr fail! (0x%08x)", st); + } } - _DBG("after execute coreclr"); - - st = shutdownCoreCLR(hostHandle, domainId); - if (st < 0) + if (dlclose(coreclrLib) != 0) { - // shutdown fail - _ERR("shutdown core clr fail! (0x%08x)", st); - exit(-1); + _ERR("libcoreclr.so close failed"); } } diff --git a/src/launcher.h b/src/launcher.h index 946fed4..7030f85 100644 --- a/src/launcher.h +++ b/src/launcher.h @@ -34,7 +34,6 @@ class Launcher Launcher(); ~Launcher(); void Initialize(); - void Dispose(); void Launch(const string& exe_path, int argc, char *argv[]); private: