summaryrefslogtreecommitdiff
path: root/src/run
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-12-24 00:34:34 +0100
committerLennart Poettering <lennart@poettering.net>2017-02-03 11:51:57 +0100
commit9182fb52acc5993a86b83c2fe4216a542cecf226 (patch)
tree8fbb1fc82d377d71f040145158b1be558b3d5030 /src/run
parent578c03bce0816b21f00e4ef9734e5c1c1a63dcc6 (diff)
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.
Diffstat (limited to 'src/run')
-rw-r--r--src/run/run.c6
1 files changed, 6 insertions, 0 deletions
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));