From 8c9a76651a9f2106d9e8cc853b848060455858e6 Mon Sep 17 00:00:00 2001 From: Tycho Andersen Date: Thu, 25 Feb 2016 17:04:01 -0700 Subject: [PATCH] start: setsid in init task as well If we don't do this, we'll leak the parent's session id to the container, which maybe doesn't matter, but it still seems better to set it anyway. Also, it breaks CRIU for containers that don't call setsid themselves. Signed-off-by: Tycho Andersen --- src/lxc/start.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lxc/start.c b/src/lxc/start.c index acf32e4b5..6a3ab9523 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -851,6 +851,8 @@ static int do_start(void *data) goto out_warn_father; } + setsid(); + /* after this call, we are in error because this * ops should not return as it execs */ handler->ops->start(handler, handler->data); -- 2.47.2