You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Process execution timeout does not kill the whole process tree. My use case is the timeout for the "dotnet test". This process spawns the child process; when timeout happens, only the main process is killed.
Reproduction Steps
running dotnet test for net4.8 framework; Add Thread.Sleep in tests more than and Timeout in nuke build; After timeout observe orphan processes left in "procexp" tool
ElijahReva
changed the title
ProcessExecutionTimeout leaves child processes after timout
ProcessExecutionTimeout leaves child processes after timeout
Dec 19, 2023
Usage Information
Any
Description
Process execution timeout does not kill the whole process tree. My use case is the timeout for the "dotnet test". This process spawns the child process; when timeout happens, only the main process is killed.
Reproduction Steps
running dotnet test for net4.8 framework; Add Thread.Sleep in tests more than and Timeout in nuke build; After timeout observe orphan processes left in "procexp" tool
Expected Behavior
No orphan processes are left
Actual Behavior
Only the parent process is killed
Regression?
Nope.
Known Workarounds
netstandart2.0 examples
https://github.com/dotnet/msbuild/blob/vs15.9/src/Utilities/ProcessExtensions.cs
https://raw.githubusercontent.com/dotnet/cli/master/test/Microsoft.DotNet.Tools.Tests.Utilities/Extensions/ProcessExtensions.cs
Latest Microsoft solution
https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.process.kill?view=net-8.0#remarks
Could you help with a pull-request?
Yes
The text was updated successfully, but these errors were encountered: