Skip to content

fix(process-runner): tolerate EPERM from a group kill after the leader exited - #6

Merged
wolfmanfx merged 1 commit into
mainfrom
mme/process-runner-eperm
Oct 30, 2026
Merged

wolfmanfx merged 1 commit into
mainfrom
mme/process-runner-eperm

Conversation

@mme

@mme mme commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator

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 SIGKILL to the group from the close handler. macOS answers EPERM for a group whose leader is already gone, not ESRCH. The runner only tolerated ESRCH, so the throw escaped the close handler, the run promise never resolved, and the stop never finished.

 kill(signal)
   process.kill(-child.pid, signal)
-  ignore ESRCH
+  ignore ESRCH and EPERM   # nothing left to signal either way

Evidence

  • Before: check runs 41055118166 and its rerun on fix(computer-use): tell Linux users that Hyprland is read-only #5, both failing on that test with kill EPERM and Test timed out in 5000ms.
  • After: the process-runner test passes locally (Linux, where the group kill answers 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.

…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.
@wolfmanfx
wolfmanfx merged commit f5938ad into main Oct 30, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants