[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
}
}
-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));
// 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<const char**>(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<const char**>(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");
}
}