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 <t.olszak@samsung.com>
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))
{