From: Jonathan Calmels Date: Tue, 21 Nov 2017 01:30:45 +0000 (-0800) Subject: lxc_init: set the control terminal in the child session X-Git-Tag: lxc-3.0.0.beta1~179^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0cf42eddd2a49c37f8b0e930344fe8724c95073e;p=thirdparty%2Flxc.git lxc_init: set the control terminal in the child session Signed-off-by: Jonathan Calmels --- diff --git a/src/lxc/tools/lxc_init.c b/src/lxc/tools/lxc_init.c index 56cc7e084..82935a381 100644 --- a/src/lxc/tools/lxc_init.c +++ b/src/lxc/tools/lxc_init.c @@ -201,6 +201,9 @@ int main(int argc, char *argv[]) if (sid < 0) DEBUG("Failed to make child session leader"); + if (ioctl(STDIN_FILENO, TIOCSCTTY, 0) < 0) + DEBUG("Failed to set controlling terminal"); + NOTICE("Exec'ing \"%s\"", my_args.argv[0]); ret = execvp(my_args.argv[0], my_args.argv);