Skip to content

Testing: add a force-kill check and a stop-in-call check - #58

Merged
HalRiveria merged 1 commit into
mainfrom
docs/testing-force-kill-stop
Nov 17, 2026
Merged

HalRiveria merged 1 commit into
mainfrom
docs/testing-force-kill-stop

Conversation

@HalRiveria-Bot

Copy link
Copy Markdown
Collaborator

Two checks for Testing/, behind claims the README already makes. Like the other scripts there, they aren't part of the harness. No change to the kit or the harness.

  • Testing/force-kill/run.ps1, behind "No orphans": each round starts a host PowerShell that runs 20 cmd /c ping jobs through Start-PkProcess, kills that host with taskkill /F (the host only, not its tree), and counts any ping still running. Nothing in the harness kills PowerShell itself outright with child programs running.
  • Testing/stop-in-call/run.ps1, behind the Limits note that a worker stuck in a .NET call can't be interrupted: a real Ctrl+C (sent to a child console of its own, as harness section V does) or PowerShell.Stop() arrives during a 3 s .NET call. It records whether the call is cut short and how far the script gets before the stop takes effect, also after PowerShell has compiled the code.

The README's Testing/ list gets a line for each.

Tested on Windows PowerShell 5.1 and PowerShell 7.6:

  • force-kill: 0 of 300 pings survived on each.
  • stop-in-call: 15 of 15 passed on each. No call was interrupted (Stop() waited about 2.2 s for each to finish), and the stop always took effect at the script function call (step 4), after the assignment, the if/try around a .NET method call, and the second try/if (steps 1 to 3) had all run.

🤖 Generated with Claude Code

force-kill/run.ps1 starts cmd /c ping jobs through Start-PkProcess, kills the PowerShell running them with taskkill /F (that process only), and counts any ping left running: the check behind "No orphans" for a script killed outright.

stop-in-call/run.ps1 sends a real Ctrl+C (to a child console of its own) or PowerShell.Stop() while a .NET call runs, and records where the stop takes effect: never inside the call, and only at the next function or cmdlet call, also once PowerShell has compiled the code. Behind the Limits note on workers stuck in a .NET call.

The README lists both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@HalRiveria
HalRiveria merged commit 13b2d13 into main Nov 17, 2026
2 checks passed
@HalRiveria
HalRiveria deleted the docs/testing-force-kill-stop branch November 17, 2026 16:06
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