From e18f969cf123c2221dd4d08b60332d17755f1d16 Mon Sep 17 00:00:00 2001 From: Ilya Date: Tue, 19 Dec 2023 11:49:43 +0100 Subject: [PATCH] fix(tools): kill child process on timeout --- source/Nuke.Tooling/Process2.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/Nuke.Tooling/Process2.cs b/source/Nuke.Tooling/Process2.cs index fb3f1f8ca..45b79005e 100644 --- a/source/Nuke.Tooling/Process2.cs +++ b/source/Nuke.Tooling/Process2.cs @@ -42,9 +42,9 @@ public void Dispose() _process.Dispose(); } - public void Kill() + public void Kill(bool entireProcessTree = false) { - _process.Kill(); + _process.Kill(entireProcessTree); } public bool WaitForExit() @@ -53,7 +53,7 @@ public bool WaitForExit() // use _process.StartTime var hasExited = _process.WaitForExit(_timeout ?? -1); if (!hasExited) - _process.Kill(); + _process.Kill(entireProcessTree: true); return hasExited; } }