diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-02-18 23:32:55 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-02-18 23:36:20 +0100 |
commit | 9c857b9d160c10b4454fc9f83442c1878343422f (patch) | |
tree | f6152bb50a8bb9dbf6fcecfc3599affa541d92b9 /src/run | |
parent | 04155c67139fdd983f08e61e8a56d27341a4ea72 (diff) |
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
Diffstat (limited to 'src/run')
-rw-r--r-- | src/run/run.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/run/run.c b/src/run/run.c index 32191a6ac0..3ded2c7e66 100644 --- a/src/run/run.c +++ b/src/run/run.c @@ -776,7 +776,7 @@ static int start_transient_service( if (!arg_quiet) log_info("Running as unit %s.\nPress ^] three times within 1s to disconnect TTY.", service); - r = pty_forward_new(event, master, false, &forward); + r = pty_forward_new(event, master, false, false, &forward); if (r < 0) return log_error_errno(r, "Failed to create PTY forwarder: %m"); |