Repository navigation
EXC-1943 Reap spec nvims when an interrupted test run exits - #44
Merged
Merged
Conversation
A spec nvim signalled inside vim.fn.system() hangs in exit teardown, ignores SIGTERM, and outlives an interrupted run reparented to PID 1. - On exit, SIGKILL every harness nvim left in the runner's process group - Trap HUP, INT and TERM into a normal exit so that reap runs - Background the outer nvim and wait on it, since bash defers a trap until its foreground child exits
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of: EXC-1943
Change Kind: bug fix
What changed
An interrupted
mise run test(a timeout, Ctrl-C, a closed pane, a cancelled pre-push) used to leave its headless spec nvims running forever: one signalled insidevim.fn.system()hangs in exit teardown, ignores SIGTERM, and is reparented to PID 1. The test runner now SIGKILLs every harness nvim left in its own process group whenever it exits, and turns HUP, INT and TERM into a normal exit so that reap runs..mise/tasks/coveragehas the same leak shape and is left for a follow-up.What to test
bash .mise/tasks/test, send its process group TERM, HUP or INT a few seconds in, and confirmpgrep -g <pgid>finds nothing afterwards. Before this change, the same test left 25 spec nvims behind.mise run test tests/git_spec.lua) still exits 0, and a failing spec still exits 1.PlenaryBustedDirectory|plenary.bustedpattern, so a concurrent suite in another worktree, or an editor nvim in the same group, is left alone.