From 9182fb52acc5993a86b83c2fe4216a542cecf226 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sat, 24 Dec 2016 00:34:34 +0100 Subject: 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. --- src/run/run.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/run/run.c b/src/run/run.c index df3b47af29..d3d491e87f 100644 --- a/src/run/run.c +++ b/src/run/run.c @@ -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)); -- cgit v1.2.3-54-g00ecf