From 95090af201040910bd328bd0cc97cfad49b21762 Mon Sep 17 00:00:00 2001 From: Woongsuk Cho Date: Fri, 10 Aug 2018 11:19:24 +0900 Subject: [PATCH] create coredump for unhandled exception Change-Id: Ic03d31c38b0c2e6626844a7707e6c9e111729791 --- NativeLauncher/launcher/dotnet/dotnet_launcher.cc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/NativeLauncher/launcher/dotnet/dotnet_launcher.cc b/NativeLauncher/launcher/dotnet/dotnet_launcher.cc index f5a43da..ced9782 100644 --- a/NativeLauncher/launcher/dotnet/dotnet_launcher.cc +++ b/NativeLauncher/launcher/dotnet/dotnet_launcher.cc @@ -138,8 +138,16 @@ static void onSigabrt(int signum) } if (hasException()) { - write(2, "Unhandled exception is occured. Ignore coredump creation and terminate normally\n", 80); - exit(0); + write(2, "******************************************************\n", 55); + write(2, "Unhandled exception is occured. check application code\n", 55); + write(2, "******************************************************\n", 55); + } + + checkOnSigabrt = true; + if (sigaction(SIGABRT, &sig_abrt_old, NULL) == 0) { + if (raise(signum) < 0) { + write(2, "Fail to raise SIGABRT\n", 22); + } } else { write(2, "SIGABRT from native. raise SIGABRT\n", 35); checkOnSigabrt = true; -- 2.7.4