From: shashank.p Date: Wed, 18 May 2016 09:28:19 +0000 (+0530) Subject: Kill Screen-reader via SIGTERM only if aul_terminate_pid fails(returns a negative... X-Git-Tag: accepted/tizen/common/20160524.150250^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=65a8179bd64640d3c76767121dbf45ce9b8422ae;p=platform%2Fupstream%2Fat-spi2-core.git Kill Screen-reader via SIGTERM only if aul_terminate_pid fails(returns a negative value) Change-Id: I8e863f3cc0acc11306eeb6a7e2fce50c9e75b65a Signed-off-by: shashank.p --- diff --git a/bus/at-spi-bus-launcher.c b/bus/at-spi-bus-launcher.c index 73c8a73..3f6c917 100644 --- a/bus/at-spi-bus-launcher.c +++ b/bus/at-spi-bus-launcher.c @@ -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);