mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-07-02 00:51:15 -03:00
Remove SIGTTOU handler before restoring foreground process group
When fish exits, it tries to restore the foreground process group. However this may actually steal control of the fg process group from another process. Fix this by clearing the SIGTTOU handler so that tcsetpgrp() will fail. Credit to @mqudsi for awesome debugging. Fixes #7060
This commit is contained in:
@@ -528,7 +528,7 @@ int main(int argc, char **argv) {
|
||||
event_fire_generic(parser, L"fish_exit", &event_args);
|
||||
|
||||
restore_term_mode();
|
||||
restore_term_foreground_process_group();
|
||||
restore_term_foreground_process_group_for_exit();
|
||||
|
||||
if (g_profiling_active) {
|
||||
parser.emit_profiling(s_profiling_output_filename);
|
||||
|
||||
Reference in New Issue
Block a user