From 7da8ab18d961f7d109d3ba6fe128f2345d82ec91 Mon Sep 17 00:00:00 2001 From: Serge Hallyn Date: Sat, 15 Feb 2014 12:50:31 -0600 Subject: [PATCH] close inherited fds when we still have proc mounted and don't close the sigfd Signed-off-by: Serge Hallyn --- src/lxc/start.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lxc/start.c b/src/lxc/start.c index 60699c323..5b3b6eb11 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -650,6 +650,9 @@ static int do_start(void *data) if (lsm_process_label_set(lsm_label, 1, 1) < 0) goto out_warn_father; + if (lxc_check_inherited(handler->conf, handler->sigfd)) + return -1; + /* If we mounted a temporary proc, then unmount it now */ tmp_proc_unmount(handler->conf); @@ -678,9 +681,6 @@ static int do_start(void *data) close(handler->sigfd); - if (lxc_check_inherited(handler->conf, -1)) - return -1; - /* after this call, we are in error because this * ops should not return as it execs */ handler->ops->start(handler, handler->data); -- 2.47.2