terminal-util: reset /dev/console via ansi seq also in make_console_stdio()

This appears to have been the intention of
00bc83a275, judging by the comments on
that.
This commit is contained in:
Lennart Poettering
2024-07-19 11:41:43 +02:00
parent f6927e3c98
commit 963e25c23b
+4
View File
@@ -614,6 +614,10 @@ int make_console_stdio(void) {
} else
(void) terminal_fix_size(fd, fd);
r = terminal_reset_ansi_seq(fd);
if (r < 0)
log_warning_errno(r, "Failed to reset terminal using ANSI sequences, ignoring: %m");
r = rearrange_stdio(fd, fd, fd); /* This invalidates 'fd' both on success and on failure. */
if (r < 0)
return log_error_errno(r, "Failed to make terminal stdin/stdout/stderr: %m");