mirror of https://github.com/winsw/winsw
Update process tree termination to be bottom up
parent
e4cf507bae
commit
9f9d340e79
|
@ -17,8 +17,6 @@ namespace WinSW.Util
|
||||||
|
|
||||||
public static void StopTree(this Process process, int millisecondsTimeout)
|
public static void StopTree(this Process process, int millisecondsTimeout)
|
||||||
{
|
{
|
||||||
StopPrivate(process, millisecondsTimeout);
|
|
||||||
|
|
||||||
foreach (var child in GetChildren(process))
|
foreach (var child in GetChildren(process))
|
||||||
{
|
{
|
||||||
using (child.Process)
|
using (child.Process)
|
||||||
|
@ -27,6 +25,8 @@ namespace WinSW.Util
|
||||||
StopTree(child.Process, millisecondsTimeout);
|
StopTree(child.Process, millisecondsTimeout);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
StopPrivate(process, millisecondsTimeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static void StopDescendants(this Process process, int millisecondsTimeout)
|
internal static void StopDescendants(this Process process, int millisecondsTimeout)
|
||||||
|
|
Loading…
Reference in New Issue