summaryrefslogtreecommitdiff
path: root/src/launchpad.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/launchpad.c')
-rwxr-xr-xsrc/launchpad.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/launchpad.c b/src/launchpad.c
index c12abc6..4d85ea9 100755
--- a/src/launchpad.c
+++ b/src/launchpad.c
@@ -544,8 +544,6 @@ static int __launch_directly(const char *appid, const char *app_path, int clifd,
candidate_process_context_t *cpc)
{
int pid = fork();
- int max_fd;
- int iter_fd;
if (pid == 0) {
PERF("fork done");
@@ -554,10 +552,7 @@ static int __launch_directly(const char *appid, const char *app_path, int clifd,
__signal_unblock_sigchld();
__signal_fini();
- max_fd = sysconf(_SC_OPEN_MAX);
- for (iter_fd = 3; iter_fd <= max_fd; iter_fd++)
- close(iter_fd);
-
+ _close_all_fds(0);
_delete_sock_path(getpid(), getuid());
PERF("prepare exec - first done");