Skip to content

Commit

Permalink
fix(tools): kill child process on timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
ElijahReva committed Dec 19, 2023
1 parent 30aa4a8 commit e18f969
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/Nuke.Tooling/Process2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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;
}
}

0 comments on commit e18f969

Please sign in to comment.