Bug fix for ProcUtils

This commit is contained in:
2dust
2025-01-11 10:44:34 +08:00
parent 6c6de1ae7f
commit a176613119
3 changed files with 32 additions and 4 deletions

View File

@@ -106,7 +106,13 @@
if (Utils.IsWindows())
{
_processJob ??= new();
_processJob?.AddProcess(processHandle);
try
{
_processJob?.AddProcess(processHandle);
}
catch
{
}
}
}

View File

@@ -258,6 +258,7 @@ namespace ServiceLib.Handler
proc.BeginErrorReadLine();
}
AppHandler.Instance.AddProcess(proc.Handle);
if (proc.WaitForExit(1000))
{
proc.CancelErrorRead();