mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-30 11:11:13 -03:00
Only modify terminal modes after config.fish if we have the terminal
This tried fiddling with the terminal even if fish didn't own it, e.g.
in
fish -c 'sleep 5' &
Fixes #7808.
This commit is contained in:
@@ -1342,7 +1342,9 @@ void reader_init() {
|
||||
|
||||
// Set up our fixed terminal modes once,
|
||||
// so we don't get flow control just because we inherited it.
|
||||
term_donate(/* quiet */ true);
|
||||
if (getpgrp() == tcgetpgrp(STDIN_FILENO)) {
|
||||
term_donate(/* quiet */ true);
|
||||
}
|
||||
|
||||
// We do this not because we actually need the window size but for its side-effect of correctly
|
||||
// setting the COLUMNS and LINES env vars.
|
||||
|
||||
Reference in New Issue
Block a user