From 9581b4b739323e8ccf85362d7da4be26cd459f4b Mon Sep 17 00:00:00 2001 From: Vincent Giersch Date: Fri, 23 May 2014 11:04:26 +0200 Subject: [PATCH] Fix a file descriptor leak in the daemonization MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Especially when using the Python API, the child process inherits of the file descriptiors of the script. Signed-off-by: Vincent Giersch Acked-by: Stéphane Graber --- src/lxc/lxccontainer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c index 553f026d6..38197d606 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -625,6 +625,7 @@ static bool lxcapi_start(struct lxc_container *c, int useinit, char * const argv SYSERROR("Error chdir()ing to /."); return false; } + lxc_check_inherited(conf, -1); close(0); close(1); close(2);