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
Handler for --on-job-exit $fish_pid runs constantly #7721
Labels
bug
Something that's not working as intended
Milestone
Comments
mqudsi
added a commit
that referenced
this issue
Mar 6, 2021
While pid values may be reused, it is logical to assume that fish event handlers coded against a particular job or process id mean just the job that is currently referred to be any given pid/pgrp rather than in perpetuity. This trims the list of registered event handlers nice and early, and as a bonus avoids the issue described in #7721. The cleanup song-and-dance is extremely ugly due to the repeated locking and unlocking of the event handler list. Closes #7221.
Fixed in e7398c0 but I fat-fingered the commit message and it auto-closed the wrong issue. |
Thanks, @mqudsi |
faho
added a commit
that referenced
this issue
Mar 26, 2021
We have no idea why this was even a thing. For now simply set it to "all"/"full" (why these two names? no idea) at startup and allow changing it later. Settting it *immediately* when defining the variable sets it too soon because we don't have the interactive signal handlers enabled (including the one for SIGTTOU), so let's first settle for this little piece of awkwardness. This needs widespread testing, so we merge it early, immediately after the release. Fixes #5036 Fixes #5832 Fixes #7721 (and probably numerous others)
ridiculousfish
added a commit
to ridiculousfish/fish-shell
that referenced
this issue
May 22, 2021
When a job is placed in the background, fish will set the `$last_pid` variable. Prior to this change, `$last_pid` was set to the process group leader of the job. However this caussed problems when the job ran in fish's process group, because then fish itself would be the process group leader and commands like `wait` would not work. Switch `$last_pid` to be the actual last pid of the pipeline. This brings it in line with the `$!` variable from zsh and bash. This is technically a breaking change, but it is unlikely to cause problems, because `$last_pid` was already rather broken. Fixes fish-shell#5036 Fixes fish-shell#5832 Fixes fish-shell#7721
ridiculousfish
added a commit
that referenced
this issue
May 25, 2021
When a job is placed in the background, fish will set the `$last_pid` variable. Prior to this change, `$last_pid` was set to the process group leader of the job. However this caussed problems when the job ran in fish's process group, because then fish itself would be the process group leader and commands like `wait` would not work. Switch `$last_pid` to be the actual last pid of the pipeline. This brings it in line with the `$!` variable from zsh and bash. This is technically a breaking change, but it is unlikely to cause problems, because `$last_pid` was already rather broken. Fixes #5036 Fixes #5832 Fixes #7721
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
As reported on gitter by @scorphus, another for the "fixed by status job-control full" (#5036) pile:
Run this interactively and it will trigger constantly - presumably whenever you run the prompt or similar.
This is presumably because the prompt doesn't have "job-control" enabled and therefore runs with fish's pgroup.
While on-job-exit doesn't make sense here, it shouldn't trigger constantly.
The text was updated successfully, but these errors were encountered: