1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-24 21:34:08 +03:00

run: explicitly close pty forwarder before printing summary

If the PTY forwarder is still around our TTY will have borked settings,
regarding newlines, hence explicitly close it before showing the
summary, so that it looks pretty.
This commit is contained in:
Lennart Poettering 2016-12-24 00:34:34 +01:00
parent 578c03bce0
commit 9182fb52ac

View File

@ -1059,6 +1059,12 @@ static int start_transient_service(
}
if (!arg_quiet) {
/* Explicitly destroy the PTY forwarder, so that the PTY device is usable again, in its
* original settings (i.e. proper line breaks), so that we can show the summary in a pretty
* way. */
c.forward = pty_forward_free(c.forward);
if (!isempty(c.result))
log_info("Finished with result: %s", strna(c.result));