1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-11 09:18:07 +03:00

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-10 17:53:58 +02:00
parent f6927e3c98
commit 963e25c23b

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");