Skip to content

Commit 963e25c

Browse files
committed
terminal-util: reset /dev/console via ansi seq also in make_console_stdio()
This appears to have been the intention of 00bc83a, judging by the comments on that.
1 parent f6927e3 commit 963e25c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/basic/terminal-util.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -614,6 +614,10 @@ int make_console_stdio(void) {
614614
} else
615615
(void) terminal_fix_size(fd, fd);
616616

617+
r = terminal_reset_ansi_seq(fd);
618+
if (r < 0)
619+
log_warning_errno(r, "Failed to reset terminal using ANSI sequences, ignoring: %m");
620+
617621
r = rearrange_stdio(fd, fd, fd); /* This invalidates 'fd' both on success and on failure. */
618622
if (r < 0)
619623
return log_error_errno(r, "Failed to make terminal stdin/stdout/stderr: %m");

0 commit comments

Comments
 (0)