fix closed fd when they are inherited
This patch fix a problem with the commit d983b93c
When the lxc daemonize, it closes fd 0, 1 and 2. But these ones are coming from
inherited fd and they are already in the inherited list of fd. When lxc creates
some file descriptors, they have the number of the previous inherited file
descriptor, so they are closed when we close all the inherited file descriptors.
In order to fix that, the lxc_close_inherited_fd function has been implemented
to close an inherited fd and remove it from the list.
Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com>
Showing
Please
register
or
sign in
to comment