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
2017-02-03 11:51:57 +01:00
parent 578c03bce0
commit 9182fb52ac
+6
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));