Set child subreaper attribute 14/317714/1
authorHwankyu Jhun <h.jhun@samsung.com>
Fri, 29 Oct 2021 06:09:19 +0000 (15:09 +0900)
committerChanggyu Choi <changyu.choi@samsung.com>
Tue, 7 Jan 2025 04:11:06 +0000 (13:11 +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 448d9249a755cde8d4a82f3d116ca5d7a48b8a3a..1224568da0edf8c7993b490d61dad7c3db0094f6 100644 (file)
@@ -3210,6 +3210,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");