diff options
Diffstat (limited to 'fish.cpp')
-rw-r--r-- | fish.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -389,7 +389,6 @@ int main(int argc, char **argv) set_main_thread(); setup_fork_guards(); - save_term_foreground_process_group(); wsetlocale(LC_ALL, L""); is_interactive_session=1; @@ -410,6 +409,12 @@ int main(int argc, char **argv) no_exec = 0; } + /* Only save (and therefore restore) the fg process group if we are interactive. See #197, #1002 */ + if (is_interactive_session) + { + save_term_foreground_process_group(); + } + const struct config_paths_t paths = determine_config_directory_paths(argv[0]); proc_init(); @@ -511,6 +516,7 @@ int main(int argc, char **argv) proc_fire_event(L"PROCESS_EXIT", EVENT_EXIT, getpid(), res); + restore_term_mode(); restore_term_foreground_process_group(); history_destroy(); proc_destroy(); |