Repository navigation
fix(process-runner): tolerate EPERM from a group kill after the leader exited - #6
Merged
Merged
Conversation
…r exited macOS answers EPERM, not ESRCH, when the leader of a process group is already gone; the SIGKILL sent after close then threw inside the close handler, the run never resolved, and verify.service.spec's Stop test timed out on the macOS CI runner.
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.
Summary
The check workflow fails on the macOS runner in
verify.service.spec.ts("Stop ends a check and its descendant before removing the scratch worktree"):Error: kill EPERM, then a 5 s timeout. It failed twice in a row on #5, which was merged before this fix.Cause: after a managed process group's leader exits, the runner sends a safety
SIGKILLto the group from theclosehandler. macOS answersEPERMfor a group whose leader is already gone, notESRCH. The runner only toleratedESRCH, so the throw escaped the close handler, the run promise never resolved, and the stop never finished.Evidence
kill EPERMandTest timed out in 5000ms.ESRCH); this PR's own check run is the macOS verification.Merge Danger
Door: two-way
Blast Radius: small
One error code added to an ignore list in the shared process runner. A real permission problem signalling a group would now be silent; that cannot happen for groups the backend itself spawned.