]> git.proxmox.com Git - mirror_lxc.git/commit - src/lxc/start.c
start: dup std{in,out,err} to pty slave
authorLi Feng <lifeng68@huawei.com>
Mon, 10 Jul 2017 09:19:52 +0000 (17:19 +0800)
committerChristian Brauner <christian.brauner@ubuntu.com>
Mon, 10 Jul 2017 09:41:02 +0000 (11:41 +0200)
commitc5b93afba1d79c6861a6f45db2943b6f3cfbdab4
tree1afe97026d650f1d5d525313f48224bf214e2626
parent1a6cb1cea40a5a316a4476c86d2061e59b93fe9d
start: dup std{in,out,err} to pty slave

In the case the container has a console with a valid slave pty file descriptor
we duplicate std{in,out,err} to the slave file descriptor so console logging
works correctly. When the container does not have a valid slave pty file
descriptor for its console and is started daemonized we should dup to
/dev/null.

Closes #1646.

Signed-off-by: Li Feng <lifeng68@huawei.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/start.c