Fix sending wrong signal 49/320649/1
authorHwankyu Jhun <h.jhun@samsung.com>
Wed, 20 Nov 2024 08:10:05 +0000 (17:10 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Wed, 20 Nov 2024 08:10:05 +0000 (17:10 +0900)
If the delay count is not over 10, amd should not send SIGABRT to
the running process.

Change-Id: Ic2a614dc641a5fce4812a1158214012db4f29239
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/lib/app_status/app_status_manager.cc

index 5d77062f8d73b339880915d9edaa8a6e0cf42cf5..124edc89b6ac75c7b94657b5540ebb8046f9ec4d 100644 (file)
@@ -166,7 +166,9 @@ void AppStatusManager::OnDyingTimeout(AppStatus* app_status) {
       app_status->GetAppID().c_str(), app_status->GetPID(),
       app_status->IsStarting() ? "true" : "false",
       app_status->GetDelayCount());
-  int signo = app_status->IsStarting() ? SIGKILL : SIGABRT;
+  int signo = SIGKILL;
+  if (!app_status->IsStarting() && app_status->GetDelayCount() >= 10)
+    signo = SIGABRT;
   int ret = kill(app_status->GetPID(), signo);
   if (ret < 0) {
     _W("Failed to send signal(%d) signal, pid(%d), errno(%d)",