Skip to content

Conversation

@stephentoub
Copy link
Contributor

On .NET 8, use the built-in Process.Kill(entireProcessTree: true) instead of spawning a separate taskkill process on Windows.

This shaves a minute or two off overall test execution.

…rocess termination

On .NET 8+, use the built-in Process.Kill(entireProcessTree: true) instead of
spawning a separate taskkill process on Windows. This reduces process cleanup
time from ~420ms to ~60ms (7x faster), significantly speeding up tests that
spawn child processes.

The taskkill-based approach is retained for .NET Standard 2.0 where
Process.Kill(bool) is not available.
@stephentoub stephentoub requested a review from halter73 January 28, 2026 16:49
@halter73 halter73 merged commit aaf2246 into modelcontextprotocol:main Jan 29, 2026
17 of 21 checks passed
@stephentoub stephentoub deleted the processkill branch January 29, 2026 19:30
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