mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-17 04:32:45 +08:00
Don't call redirect_tty_output when restoring the front process group
redirect_tty_output was a clumsy attempt to work around a glibc bug, but it's not necessary if fish is about to exit.
This commit is contained in:
parent
a2ae2d6c36
commit
03208acb60
|
@ -2101,11 +2101,10 @@ void save_term_foreground_process_group() {
|
|||
}
|
||||
|
||||
void restore_term_foreground_process_group() {
|
||||
if (initial_fg_process_group == -1) return;
|
||||
// This is called during shutdown and from a signal handler. We don't bother to complain on
|
||||
// failure because doing so is unlikely to be noticed.
|
||||
if (tcsetpgrp(STDIN_FILENO, initial_fg_process_group) == -1 && errno == ENOTTY) {
|
||||
redirect_tty_output();
|
||||
if (initial_fg_process_group != -1) {
|
||||
// This is called during shutdown and from a signal handler. We don't bother to complain on
|
||||
// failure because doing so is unlikely to be noticed.
|
||||
(void)tcsetpgrp(STDIN_FILENO, initial_fg_process_group);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user