From: Tycho Andersen Date: Fri, 26 Feb 2016 00:04:01 +0000 (-0700) Subject: start: setsid in init task as well X-Git-Tag: lxc-2.0.0.rc4~7^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F851%2Fhead;p=thirdparty%2Flxc.git 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 --- 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);