Commit 12752e27 by Christian Brauner

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 2>/dev/null - lxc-attach -n a runlevel </dev/null 2>/dev/null | cat Signed-off-by: 's avatarChristian Brauner <christian.brauner@mailbox.org>
parent 5a8929b1
...@@ -273,6 +273,7 @@ static int get_pty_on_host(struct lxc_container *c, struct wrapargs *wrap, int * ...@@ -273,6 +273,7 @@ static int get_pty_on_host(struct lxc_container *c, struct wrapargs *wrap, int *
if (lxc_console_create(conf) < 0) if (lxc_console_create(conf) < 0)
return -1; return -1;
ts = conf->console.tty_state; ts = conf->console.tty_state;
ts->stdoutfd = STDOUT_FILENO;
conf->console.descr = &descr; conf->console.descr = &descr;
/* Shift ttys to container. */ /* Shift ttys to container. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment