mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 10:43:32 +08: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.
This commit is contained in:
parent
95dc821a44
commit
e4fd664bbb
|
@ -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 New Issue
Block a user