From: Tomasz Olszak Date: Wed, 10 Jun 2015 10:12:54 +0000 (+0200) Subject: Fixed state of screen-reader wher screen-reader exits abnormally X-Git-Tag: accepted/tizen/common/20160203.160738~10 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fupstream%2Fat-spi2-core.git;a=commitdiff_plain;h=4c1621c3d7edf56fc6a719a32dcdb83286bb0dcd Fixed state of screen-reader wher screen-reader exits abnormally When screen-reader e.g. crashed, bus-launcher didn't check if the process is still running before it tried to terminated it. In result screen-reader's invalid PID was kept and new screen-reader couldn't be launched. Change-Id: I599c7e7962a16b031e913c1a957b2f33f225a6f3 Signed-off-by: Tomasz Olszak --- diff --git a/bus/at-spi-bus-launcher.c b/bus/at-spi-bus-launcher.c index 08566d6..a84270b 100644 --- a/bus/at-spi-bus-launcher.c +++ b/bus/at-spi-bus-launcher.c @@ -601,6 +601,16 @@ _terminate_screen_reader(A11yBusLauncher *bl) if (bl->pid <= 0) return FALSE; + + int status = aul_app_get_status_bypid(bl->pid); + + if (status < 0) + { + LOGD("App with pid %d already terminated", bl->pid); + bl->pid = 0; + return TRUE; + } + LOGD("terminate process with pid %d", bl->pid); if (!aul_terminate_pid(bl->pid)) {