]> git.ipfire.org Git - thirdparty/libvirt.git/commit
lxc: Don't make container's TTY a controlling TTY
authorRichard Weinberger <richard@nod.at>
Tue, 23 Jun 2015 13:18:53 +0000 (15:18 +0200)
committerDaniel P. Berrange <berrange@redhat.com>
Wed, 18 Nov 2015 11:22:33 +0000 (11:22 +0000)
commitea542455b48cd4fd468a7435fb7edece5f306b04
tree33ec326797ee3f885c536de94c7197b593909c7c
parentbd3e16a3cf89303c3ec5281c818acce418b75f50
lxc: Don't make container's TTY a controlling TTY

Userspace does not expect that the initial console
is a controlling TTY. systemd can deal with that, others not.
On sysv init distros getty will fail to spawn a controlling on
/dev/console or /dev/tty1. Which will cause to whole container
to reboot upon ctrl-c.

This patch changes the behavior of libvirt to match the kernel
behavior where the initial TTY is also not controlling.

The only user visible change should be that a container with
bash as PID 1 would complain. But this matches exactly the kernel
be behavior with init=/bin/bash.
To get a controlling TTY for bash just run "setsid /bin/bash".

Signed-off-by: Richard Weinberger <richard@nod.at>
src/lxc/lxc_container.c