Previous patch fixed behaviour with clone, so it's now safe just to set
O_CLOEXEC flag on
all inherited fd's.
Signed-off-by: Vladimir Smirnov
---
src/lxc/start.c | 15 +--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/src/lxc/start.c b/src/lxc/start.c
index b8cef
Clone allows more flexible control. Currently, if there is any inherited fd,
lxc-start exits with error. With clone it's possible not to pass open fd's to
childs.
Signed-off-by: Vladimir Smirnov
---
src/lxc/lxc_attach.c | 79 +-
src/lxc/lxc_init
On Wed, 2011-08-24 at 14:17 +0400, Vladimir Smirnov wrote:
> Clone allows more flexible control. Currently, if there is any inherited fd,
> lxc-start exits with error. With clone it's possible not to pass open fd's to
> childs.
>
Hmm... when it comes to file descriptors, you have two flavours:
-
On Wed, 2011-08-24 at 14:17 +0400, Vladimir Smirnov wrote:
> Previous patch fixed behaviour with clone, so it's now safe just to set
> O_CLOEXEC flag on
> all inherited fd's.
>
The only use case I know about where a fd leak matters is
checkpoint/restart... I think the behaviour of lxc_check_inhe