fix(frontseat-runner): GH-151 kill the whole process tree on cancellation - #242
Open
jbadeau wants to merge 1 commit into
Open
fix(frontseat-runner): GH-151 kill the whole process tree on cancellation#242jbadeau wants to merge 1 commit into
jbadeau wants to merge 1 commit into
Conversation
…tion Cancelling a build/ship left grandchildren (e.g. a Maven JVM under its wrapper) reparented to PID 1 and still mutating workspace state: every local exec site killed only the sh -c wrapper. Extract the localgrid's process-group handling into a shared procgroup package and use it at all local exec sites — build task execution, ship actions, and persistent tasks (which get SIGTERM-to-group first, preserving their grace period that CommandContext's default hard-kill had been defeating). Windows kills the tree via taskkill /T. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Fixes #151: cancelling a build could leave Maven wrapper subprocesses (and their JVMs) reparented to PID 1 for 20–30s, still mutating workspace state. Every local exec site killed only the
sh -cwrapper on context cancellation.frontseat-runner/procgrouppackage extracts the localgrid's proven process-group pattern (Setpgid+ groupSIGKILL), adds a gracefulInterrupt(groupSIGTERM), and a Windows path viataskkill /T(previously the localgrid's Windows fallback killed only the direct child).internal/build), ship actions (internal/ship), and persistent tasks — where theCanceloverride also restores the intended SIGTERM→5s→kill grace period thatCommandContext's default immediateProcess.Killhad been silently defeating.Verified: full workspace build, vet, affected module tests, and a Windows cross-compile.
🤖 Generated with Claude Code