Close all open fds before executing a loader 99/81699/1
authorHwankyu Jhun <h.jhun@samsung.com>
Thu, 28 Jul 2016 02:43:36 +0000 (11:43 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Thu, 28 Jul 2016 02:43:36 +0000 (11:43 +0900)
Change-Id: I556b4083c7bbe333d1cfe0708d40daed151bcacd
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
inc/sigchild.h
src/launchpad.c

index cfa6476..aaad0e5 100644 (file)
@@ -235,9 +235,6 @@ static inline int __signal_fini(void)
        int i;
 #endif
 
-       if (bus)
-               g_object_unref(bus);
-
 #ifndef PRELOAD_ACTIVATE
        for (i = 0; i < _NSIG; i++)
                signal(i, SIG_DFL);
index 2c73289..d55074f 100755 (executable)
@@ -380,9 +380,12 @@ static int __fork_app_process(int (*child_fn)(void *), void *arg)
 static int __exec_loader_process(void *arg)
 {
        char **argv = arg;
+
        __signal_unblock_sigchld();
        __signal_fini();
 
+       _close_all_fds(0);
+
        if (execv(argv[LOADER_ARG_PATH], argv) < 0)
                _E("Failed to prepare candidate_process");
        else