From: Vincent Giersch Date: Fri, 23 May 2014 09:04:26 +0000 (+0200) Subject: Fix a file descriptor leak in the daemonization X-Git-Tag: lxc-1.1.0.alpha2~89 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9581b4b739323e8ccf85362d7da4be26cd459f4b;p=thirdparty%2Flxc.git Fix a file descriptor leak in the daemonization 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 --- 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);