From 12752e27279455a0c766e972c4884ad501f8ef23 Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Tue, 1 Mar 2016 23:05:59 +0100 Subject: [PATCH] lxc-attach: setup ts->stdoutfd Otherwise we cannot do things like: - lxc-attach -n a runlevel /dev/null - lxc-attach -n a runlevel /dev/null | cat Signed-off-by: Christian Brauner --- src/lxc/lxc_attach.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lxc/lxc_attach.c b/src/lxc/lxc_attach.c index b6b78244b..348014d96 100644 --- a/src/lxc/lxc_attach.c +++ b/src/lxc/lxc_attach.c @@ -273,6 +273,7 @@ static int get_pty_on_host(struct lxc_container *c, struct wrapargs *wrap, int * if (lxc_console_create(conf) < 0) return -1; ts = conf->console.tty_state; + ts->stdoutfd = STDOUT_FILENO; conf->console.descr = &descr; /* Shift ttys to container. */ -- 2.47.2