Kill Screen-reader via SIGTERM only if aul_terminate_pid fails(returns a negative... 43/70143/4 accepted/tizen/common/20160524.150250 accepted/tizen/ivi/20160524.004741 accepted/tizen/mobile/20160524.004729 accepted/tizen/tv/20160524.004727 accepted/tizen/wearable/20160524.004720 submit/tizen/20160523.110651
authorshashank.p <shashank.p@samsung.com>
Wed, 18 May 2016 09:28:19 +0000 (14:58 +0530)
committershashank.p <shashank.p@samsung.com>
Wed, 18 May 2016 10:10:39 +0000 (15:40 +0530)
Change-Id: I8e863f3cc0acc11306eeb6a7e2fce50c9e75b65a
Signed-off-by: shashank.p <shashank.p@samsung.com>
bus/at-spi-bus-launcher.c

index 73c8a73..3f6c917 100644 (file)
@@ -663,6 +663,7 @@ _terminate_screen_reader(A11yBusLauncher *bl)
 {
    LOGD("Terminating screen reader");
    int ret;
+   int ret_aul;
    if (bl->pid <= 0)
      return FALSE;
 
@@ -677,11 +678,15 @@ _terminate_screen_reader(A11yBusLauncher *bl)
      }
 
    LOGD("terminate process with pid %d", bl->pid);
-   if (!aul_terminate_pid(bl->pid))
+   ret_aul = aul_terminate_pid(bl->pid);
+   if (ret_aul >= 0)
      {
+        LOGD("Terminating with aul_terminate_pid: return is %d", ret_aul);
         bl->pid = 0;
         return TRUE;
      }
+   else
+     LOGD("aul_terminate_pid failed: return is %d", ret_aul);
 
    LOGD("Unable to terminate process using aul api. Sending SIGTERM signal");
    ret = kill(bl->pid, SIGTERM);