tree-wide: acquire /dev/console lock around any attempts to reset TTY

This commit is contained in:
Lennart Poettering
2024-07-19 11:44:04 +02:00
parent dffbe1d152
commit 2cd19499a0
6 changed files with 22 additions and 3 deletions
+1 -1
View File
@@ -133,7 +133,7 @@ static void print_welcome(int rfd) {
pn = os_release_pretty_name(pretty_name, os_name);
ac = isempty(ansi_color) ? "0" : ansi_color;
(void) terminal_reset_defensive(STDOUT_FILENO, /* switch_to_text= */ false);
(void) terminal_reset_defensive_locked(STDOUT_FILENO, /* switch_to_text= */ false);
if (colors_enabled())
printf("\nWelcome to your new installation of \x1B[%sm%s\x1B[0m!\n", ac, pn);