terminal-util: add new helper terminal_reset_defensive() that combines reset-by-ioctl and reset-by-sequence reasonably

This commit is contained in:
Lennart Poettering
2024-07-19 11:41:43 +02:00
parent ce3a1593bc
commit cfac09083b
8 changed files with 36 additions and 8 deletions
+1 -1
View File
@@ -172,7 +172,7 @@ void exec_context_tty_reset(const ExecContext *context, const ExecParameters *p)
(void) terminal_vhangup_fd(fd);
if (context->tty_reset)
(void) reset_terminal_fd(fd, /* switch_to_text= */ true);
(void) terminal_reset_defensive(fd, /* switch_to_text= */ true);
(void) exec_context_apply_tty_size(context, fd, path);