New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't background a job after a previously-backgrounded job completes #7483
Comments
Notes to myself mostly but fun reading if you are inclined: The issue is annoyingly convoluted. Interactive fish stores two tty modes: Now maybe your external process is literally The fix for #2114 caused us to more eagerly restore the tty to shell-mode when a previously-backgrounded job completes. So we restore the tty to shell-mode, then later we save that as the mode for external procs. So now every proc is like a shell, which is why ctrl-Z fails. The desire in #2114 was to support foreground and backgrounding jobs from key bindings (!), not from ordinary commands. The proper fix is to extend the tty-mode save/restore to jobs spawned from key bindings, not just those typed at the command line. |
Prior to this change, for bindings which have script commands, the inputter would execute them directly. However an upcoming fix for fish-shell#7483 will require more integration with the reader. Switch to a new model where the reader passes in a function to use for executing script commands.
Prior to this change, when a process resumes because it is brought back to the foreground, we would reset the terminal attributes to shell mode. This fixed fish-shell#2114 but subtly introduced fish-shell#7483. This backs out 9fd9f70, re-introducing fish-shell#2114 and re-fixing fish-shell#7483. A followup fix will re-fix fish-shell#2114; these are broken out separately for bisecting purposes. Fixes fish-shell#7483.
Prior to this change, when a process resumes because it is brought back to the foreground, we would reset the terminal attributes to shell mode. This fixed fish-shell#2114 but subtly introduced fish-shell#7483. This backs out 9fd9f70, re-introducing fish-shell#2114 and re-fixing fish-shell#7483. A followup fix will re-fix fish-shell#2114; these are broken out separately for bisecting purposes. Fixes fish-shell#7483.
Prior to this change, for bindings which have script commands, the inputter would execute them directly. However an upcoming fix for fish-shell#7483 will require more integration with the reader. Switch to a new model where the reader passes in a function to use for executing script commands.
Prior to this change, when a process resumes because it is brought back to the foreground, we would reset the terminal attributes to shell mode. This fixed fish-shell#2114 but subtly introduced fish-shell#7483. This backs out 9fd9f70, re-introducing fish-shell#2114 and re-fixing fish-shell#7483. A followup fix will re-fix fish-shell#2114; these are broken out separately for bisecting purposes. Fixes fish-shell#7483.
Prior to this change, for bindings which have script commands, the inputter would execute them directly. However an upcoming fix for fish-shell#7483 will require more integration with the reader. Switch to a new model where the reader passes in a function to use for executing script commands.
This tracks the following regression relative to 3.1.2, I'm opening this so it doesn't get dropped:
sleep 5
fg
to foreground itsleep
complete normallysleep 100
and try to hit control-Z to background itit will no longer background.
stty -a
shows the tty mode goes fromsusp = ^Z
(correct) tosusp = <undef>
(the bug).This bisects to 3d2dc85 however that fix only revealed a latent bug; the root cause is the fix for #2114.
The text was updated successfully, but these errors were encountered: