[lxc-devel] [PATCH 2/2] lxc-start shouldn't exit with error, if there is inherited fd's.

2011-08-24 Thread Vladimir Smirnov
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

[lxc-devel] [PATCH 1/2] Modify lxc_attach and lxc_init to use clone instead of fork.

2011-08-24 Thread Vladimir Smirnov
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

Re: [lxc-devel] [PATCH 1/2] Modify lxc_attach and lxc_init to use clone instead of fork.

2011-08-24 Thread Greg Kurz
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: -

Re: [lxc-devel] [PATCH 2/2] lxc-start shouldn't exit with error, if there is inherited fd's.

2011-08-24 Thread Greg Kurz
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