Merge pull request #272 from poettering/nspawn-flush-copy-fd

nspawn: when exiting, flush all remaining bytes from the pty to stdout
This commit is contained in:
Daniel Mack 2015-06-18 00:34:22 +02:00
commit 867a99b406

View file

@ -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) {