зеркало из https://github.com/dotnet/tye.git
Generally kill both parent and their child processes. (#1232)
This commit is contained in:
Родитель
311fb03376
Коммит
a9a1b83653
|
@ -117,7 +117,7 @@ namespace Microsoft.Tye
|
|||
}
|
||||
else
|
||||
{
|
||||
process?.Kill();
|
||||
process?.Kill(entireProcessTree: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -165,7 +165,7 @@ namespace Microsoft.Tye
|
|||
{
|
||||
if (!process.CloseMainWindow())
|
||||
{
|
||||
process.Kill();
|
||||
process.Kill(entireProcessTree: true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -177,7 +177,7 @@ namespace Microsoft.Tye
|
|||
|
||||
if (!process.HasExited)
|
||||
{
|
||||
process.Kill();
|
||||
process.Kill(entireProcessTree: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -197,7 +197,7 @@ namespace Microsoft.Tye
|
|||
try
|
||||
{
|
||||
using var process = Process.GetProcessById(pid);
|
||||
process?.Kill();
|
||||
process?.Kill(entireProcessTree: true);
|
||||
}
|
||||
catch (ArgumentException) { }
|
||||
catch (InvalidOperationException) { }
|
||||
|
|
Загрузка…
Ссылка в новой задаче