Test that --on-job-exit functions run even if the job has already exited

If you define a function that you want to be called after a job has
exited, it should run immediately if that job has already exited.
This commit is contained in:
ridiculousfish 2021-10-28 10:02:48 -07:00
parent 357f49c781
commit b9a95a48b4

View File

@ -123,3 +123,10 @@ emit bar
command true &
set -l truepid $last_pid
test $truepid != $fish_pid || echo true has same pid as fish
# Job exit events work even after the job has exited!
sleep .5
function thud --on-job-exit $truepid
echo "thud called"
end
# CHECK: thud called