File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ public interface IProcess : IDisposable
54
54
/// <summary>
55
55
/// Calls <see cref="Process.Kill()"/>.
56
56
/// </summary>
57
- void Kill ( ) ;
57
+ void Kill ( bool entireProcessTree = false ) ;
58
58
59
59
/// <summary>
60
60
/// Waits for the process to exit. If the process is not exiting within a given timeout, <see cref="Kill"/> is called.
Original file line number Diff line number Diff line change @@ -42,9 +42,9 @@ public void Dispose()
42
42
_process . Dispose ( ) ;
43
43
}
44
44
45
- public void Kill ( )
45
+ public void Kill ( bool entireProcessTree = false )
46
46
{
47
- _process . Kill ( ) ;
47
+ _process . Kill ( entireProcessTree ) ;
48
48
}
49
49
50
50
public bool WaitForExit ( )
@@ -53,7 +53,7 @@ public bool WaitForExit()
53
53
// use _process.StartTime
54
54
var hasExited = _process . WaitForExit ( _timeout ?? - 1 ) ;
55
55
if ( ! hasExited )
56
- _process . Kill ( ) ;
56
+ _process . Kill ( entireProcessTree : true ) ;
57
57
return hasExited ;
58
58
}
59
59
}
You can’t perform that action at this time.
0 commit comments