Repository navigation
Tree kill: split the PIDs across taskkill calls, and kill a taskkill that hangs - #64
Merged
Merged
Conversation
…that hangs Stop-PkProcessTree put every PID on one taskkill command line, which passes Windows' 32,767-character limit at roughly 2,500-3,000 programs (the dispatcher's force-stop passes every running job at once). taskkill then couldn't start, and the fallback killed only the listed programs, not their children. The PIDs now go to as many taskkill calls as the limit needs. A taskkill still running after its 10-second wait was left running, outside the Job Object. It's now killed before the fallback runs. The body moves to Stop-PkProcessTreeCore, whose extra parameters (a stand-in taskkill, a shorter wait and argument limit) let the harness drive both cases. Co-Authored-By: Claude Opus 5.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.
Two rare failures in
Stop-PkProcessTree, the tree kill behind timeouts, aborts and the dispatcher's force-stop:taskkill /Tcommand line. That passes Windows' 32,767-character limit at roughly 2,500-3,000 programs (probed: a 36,449-character line fails with "The filename or extension is too long"), and the dispatcher's force-stop passes every running job at once. taskkill then couldn't start, so the fallback killed only the listed programs, and their children ran on until PowerShell exited.What changed
Split-PkTaskkillArguments), each still with/T.Stop-PkProcessTreeCore. Its extra parameters (the taskkill path, its wait, the argument limit) exist so the harness can drive both cases without starting thousands of programs.Stop-PkProcessTree's parameters and result are unchanged.Testing
🤖 Generated with Claude Code