Commit 9581b4b7 by Vincent Giersch Committed by Stéphane Graber

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: 's avatarVincent Giersch <vincent.giersch@ovh.net> Acked-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
parent a90842e4
...@@ -625,6 +625,7 @@ static bool lxcapi_start(struct lxc_container *c, int useinit, char * const argv ...@@ -625,6 +625,7 @@ static bool lxcapi_start(struct lxc_container *c, int useinit, char * const argv
SYSERROR("Error chdir()ing to /."); SYSERROR("Error chdir()ing to /.");
return false; return false;
} }
lxc_check_inherited(conf, -1);
close(0); close(0);
close(1); close(1);
close(2); close(2);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment