-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
Using stty in your config.fish causes background processes to suddenly stop.
To reproduce the issue add to your config.fish the following code.
stty werase undef
Then send any job to the background using &.
$ fish -c "echo" &
Job 1, 'fish -c "echo" &' has stoppedRunning jobs tells me:
Job Group State Command
1 83624 stopped fish -c "echo" &I can bring the process to the foreground using fg to finish it.
$ fg
Send job 1, 'fish -c "echo" &' to foreground
stty: tcsetattr: Interrupted system callI know that wrapping the stty command like so:
if status --is-interactive
...
end...will prevent the issue, but it's unfriendly to tell people how to write their configuration.
This issue was discovered by @tyilo while using jorgebucaran/fisher (see jorgebucaran/fisher#469). The presence of stty in their configuration causes fisher to hang because fisher keeps waiting for a process that is stopped.
I've been able to reproduce this issue on macOS, Linux (Arch) / xterm-256color running fish 2.0.0, 2.2.0, 2.7.1, and the latest fish from HEAD.