mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-07-14 12:47:41 +00:00
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 <vincent.giersch@ovh.net> Acked-by: Stéphane Graber <stgraber@ubuntu.com>
This commit is contained in:
parent
a90842e41e
commit
9581b4b739
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user