diff options
author | Daniel Mack <github@zonque.org> | 2015-06-18 00:34:22 +0200 |
---|---|---|
committer | Daniel Mack <github@zonque.org> | 2015-06-18 00:34:22 +0200 |
commit | 867a99b4061749d51b3350672715eceb9f585570 (patch) | |
tree | ac20d65844cf231566874f509105549914f2609f /src | |
parent | 561471314c1a55660063467422509352192e3408 (diff) | |
parent | 503546da7cb28219193ccad70b9682bede1f62e5 (diff) |
Merge pull request #272 from poettering/nspawn-flush-copy-fd
nspawn: when exiting, flush all remaining bytes from the pty to stdout
Diffstat (limited to 'src')
-rw-r--r-- | src/nspawn/nspawn.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index 3c31629d1e..d1154de08a 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -4972,6 +4972,10 @@ finish: if (pid > 0) kill(pid, SIGKILL); + /* Try to flush whatever is still queued in the pty */ + if (master >= 0) + (void) copy_bytes(master, STDOUT_FILENO, (off_t) -1, false); + loop_remove(loop_nr, &image_fd); if (remove_subvol && arg_directory) { |