Send sigabrt when app is not started 08/299508/4
authorChanggyu Choi <changyu.choi@samsung.com>
Wed, 4 Oct 2023 02:10:18 +0000 (11:10 +0900)
committerChanggyu Choi <changyu.choi@samsung.com>
Wed, 4 Oct 2023 03:08:31 +0000 (12:08 +0900)
Change to send SIGABRT instead of SIGKILL for debugging
when app is not started in OnDyingTimeout.

Change-Id: I0213f37cafb256399d3936155dcb17b71e107a58
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
src/lib/app_status/app_status_manager.cc

index fb19eb5..b293fe0 100644 (file)
@@ -162,11 +162,13 @@ void AppStatusManager::OnDyingTimeout(AppStatus* app_status) {
     return;
   }
 
-  _E("pid(%d)", app_status->GetPID());
-  int ret = kill(app_status->GetPID(), SIGKILL);
+  _E("pid(%d), is_starting(%s)", app_status->GetPID(),
+      app_status->IsStarting() ? "true" : "false");
+  int signo = app_status->IsStarting() ? SIGKILL : SIGABRT;
+  int ret = kill(app_status->GetPID(), signo);
   if (ret < 0) {
-    _W("Failed to send SIGKILL, pid(%d), errno(%d)",
-        app_status->GetPID(), errno);
+    _W("Failed to send signal(%d), pid(%d), errno(%d)",
+        signo, app_status->GetPID(), errno);
   }
 }