Fix checking the application status 96/177896/3
authorHwankyu Jhun <h.jhun@samsung.com>
Fri, 4 May 2018 07:47:06 +0000 (16:47 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Tue, 8 May 2018 01:00:34 +0000 (10:00 +0900)
After this patch is applied, app-installer uses
aul_app_get_status_for_uid() intead of aul_app_is_running_for_uid()
to check whether an application is running or NOT.
When an application is dying, aul_app_is_running_for_uid() returns
false.

Change-Id: I1af3904d524ee8ac9a9414a79e55f7d86aefd7e2
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/common/step/pkgmgr/step_kill_apps.cc

index d1ed25a..b8a531a 100644 (file)
@@ -15,8 +15,8 @@
 namespace {
 
 bool CheckAndKill(const std::string& appid, uid_t uid) {
-  int ret = aul_app_is_running_for_uid(appid.c_str(), uid);
-  if (ret == 0)
+  int ret = aul_app_get_status_for_uid(appid.c_str(), uid);
+  if (ret < 0)
     return true;
 
   int pid = aul_app_get_pid_for_uid(appid.c_str(), uid);