This prevents such processes from being zombie
Change-Id: Ie9fe745e7009a865703f2fb2961c3b51ab966ed7
Signed-off-by: Nikita Kalyazin <n.kalyazin@samsung.com>
#include <sys/smack.h>
#include <attr/xattr.h>
+#include <sys/wait.h> /* waitpid */
+
#include "daemon.h"
#include "utils.h"
#include "debug.h"
return -1;
if (pid > 0) { /* parent */
+ int status, ret;
+ do
+ ret = waitpid(pid, &status, 0);
+ while (ret == -1 && errno == EINTR);
return 0;
} else { /* child */
execl(LAUNCH_APP_PATH, LAUNCH_APP_NAME, app_id, LAUNCH_APP_SDK,