From: Christian Brauner Date: Tue, 1 Mar 2016 22:05:59 +0000 (+0100) Subject: lxc-attach: setup ts->stdoutfd X-Git-Tag: lxc-2.0.0.rc5~6^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F863%2Fhead;p=thirdparty%2Flxc.git 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 --- 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. */