From: Lennart Poettering Date: Fri, 23 Dec 2016 23:34:34 +0000 (+0100) Subject: run: explicitly close pty forwarder before printing summary X-Git-Tag: v233~171^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9182fb52acc5993a86b83c2fe4216a542cecf226;p=thirdparty%2Fsystemd.git 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. --- diff --git a/src/run/run.c b/src/run/run.c index df3b47af29e..d3d491e87f5 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));