From: Serge Hallyn Date: Sat, 15 Feb 2014 18:50:31 +0000 (-0600) Subject: close inherited fds when we still have proc mounted X-Git-Tag: lxc-1.0.0.rc3~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7da8ab18d961f7d109d3ba6fe128f2345d82ec91;p=thirdparty%2Flxc.git close inherited fds when we still have proc mounted and don't close the sigfd Signed-off-by: Serge Hallyn --- 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);