Set child subreaper attribute 15/265815/2
authorHwankyu Jhun <h.jhun@samsung.com>
Fri, 29 Oct 2021 06:09:19 +0000 (15:09 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Fri, 29 Oct 2021 06:35:10 +0000 (15:35 +0900)
When the hydra loader is terminated, the parent process ID of the
application that is launched using the loader process is created by
the hydra loader is changed to the launchpad-process-pool.
Currently, the hydra loader is terminated, the application is always running
as zombie process. After this patch is applied, even though the hydra load
is terminated, the launchpad-process-pool gets the SIGCHLD signal when
the application is terminated.

Change-Id: I5d1d05e25c6a0803e925c857106367cc74382631
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/launchpad-process-pool/src/launchpad.c

index d3bbf50..3d57531 100644 (file)
@@ -3241,6 +3241,8 @@ int main(int argc, char **argv)
        GMainLoop *mainloop = NULL;
 
        _print_hwc_log("%s(%d): START", __FUNCTION__, __LINE__);
+       prctl(PR_SET_CHILD_SUBREAPER, 1, 0, 0, 0);
+
        mainloop = g_main_loop_new(NULL, FALSE);
        if (!mainloop) {
                _E("Failed to create glib main loop");