mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-31 23:28:45 +00:00
Only set modes after config.fish if we're *interactive*
013a563ed0
made it so we only try to adjust terminal modes if we are in the terminal pgroup, but that's not enough. Fish starts background jobs in events inside its own pgroup, so function on-foo --on-event foo fish -c 'sleep 3' & end would have the backgrounded fish try to fiddle with the terminal and succeed. Instead, only fiddle with the terminal if we're interactive (this should probably be extended to other bits, but this is the particular problematic part) Fixes #7842. (cherry picked from commite4fd664bbb
)
This commit is contained in:
parent
b2baf110c5
commit
9221a3deca
1 changed files with 1 additions and 1 deletions
|
@ -1342,7 +1342,7 @@ void reader_init() {
|
|||
|
||||
// Set up our fixed terminal modes once,
|
||||
// so we don't get flow control just because we inherited it.
|
||||
if (getpgrp() == tcgetpgrp(STDIN_FILENO)) {
|
||||
if (is_interactive_session()) {
|
||||
term_donate(/* quiet */ true);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue