From 9c857b9d160c10b4454fc9f83442c1878343422f Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 18 Feb 2015 23:32:55 +0100 Subject: nspawn: when connected to pipes for stdin/stdout, pass them as-is to PID 1 Previously we always invoked the container PID 1 on /dev/console of the container. With this change we do so only if nspawn was invoked interactively (i.e. its stdin/stdout was connected to a TTY). In all other cases we directly pass through the fds unmodified. This has the benefit that nspawn can be added into shell pipelines. https://bugs.freedesktop.org/show_bug.cgi?id=87732 --- src/machine/machinectl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/machine/machinectl.c') diff --git a/src/machine/machinectl.c b/src/machine/machinectl.c index 053c8fbbe7..55cd854289 100644 --- a/src/machine/machinectl.c +++ b/src/machine/machinectl.c @@ -1150,7 +1150,7 @@ static int login_machine(int argc, char *argv[], void *userdata) { sd_event_add_signal(event, NULL, SIGINT, NULL, NULL); sd_event_add_signal(event, NULL, SIGTERM, NULL, NULL); - r = pty_forward_new(event, master, true, &forward); + r = pty_forward_new(event, master, true, false, &forward); if (r < 0) return log_error_errno(r, "Failed to create PTY forwarder: %m"); -- cgit v1.2.3-54-g00ecf