Skip to content
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

function --on-job-exit not triggered when busy #6679

Closed
Korkman opened this issue Feb 28, 2020 · 5 comments
Closed

function --on-job-exit not triggered when busy #6679

Korkman opened this issue Feb 28, 2020 · 5 comments
Milestone

Comments

@Korkman
Copy link

@Korkman Korkman commented Feb 28, 2020

Fish 3.1.0 on Debian Buster via SSH (Terminator)

It seems signals are not properly queued. When child exits at a time when fish is busy, the event is not triggered.

Reproduce:

sleep 3 &
function alarm --on-job-exit (jobs -p)
	echo alarm
end
sleep 5

No "alarm" output. Same goes for --on-process-exit.

@Korkman Korkman changed the title function --on-process-exit not triggered when busy function --on-job-exit not triggered when busy Feb 28, 2020
@Korkman
Copy link
Author

@Korkman Korkman commented Feb 28, 2020

Works properly with the Debian packaged Fish 3.0.2, so this is a regression?

@ridiculousfish
Copy link
Member

@ridiculousfish ridiculousfish commented Mar 1, 2020

Bisects to f8b2e81 - edit: wait, no, that was reverted in 3dfaa19 (at which point this worked) and then immediately broken by me in 55e3270

@ridiculousfish
Copy link
Member

@ridiculousfish ridiculousfish commented Mar 2, 2020

This should also go into 3.1.1, I should have a fix in next ~16 hours.

@ridiculousfish ridiculousfish added this to the fish 3.1.1 milestone Mar 2, 2020
@ridiculousfish
Copy link
Member

@ridiculousfish ridiculousfish commented Mar 2, 2020

Unfortunately it's annoying to write a test for this; I will do so after further improving job control in non-interactive shells.

ridiculousfish added a commit that referenced this issue Mar 2, 2020
55e3270 introduced a regression where we would remove all completed
jobs. But jobs that want to print a status message get skipped, so
the status message (and associated event handlers) might not get run.

Fix this by making it explicit which jobs are safe to process, and which
should be skipped.

Fixes #6679.
@ridiculousfish
Copy link
Member

@ridiculousfish ridiculousfish commented Mar 2, 2020

cherry-pick to 3.1.1 as eec90e3

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants