mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-27 20:44:00 +02:00
Changed how running a process and waiting for exit is handled
This commit is contained in:
@@ -179,9 +179,7 @@ namespace NzbDrone.Common.Processes
|
||||
public ProcessOutput StartAndCapture(string path, string args = null)
|
||||
{
|
||||
var output = new ProcessOutput();
|
||||
var process = Start(path, args, s => output.Standard.Add(s), error => output.Error.Add(error));
|
||||
|
||||
WaitForExit(process);
|
||||
Start(path, args, s => output.Standard.Add(s), error => output.Error.Add(error)).WaitForExit();
|
||||
|
||||
return output;
|
||||
}
|
||||
@@ -190,10 +188,7 @@ namespace NzbDrone.Common.Processes
|
||||
{
|
||||
Logger.Trace("Waiting for process {0} to exit.", process.ProcessName);
|
||||
|
||||
if (!process.HasExited)
|
||||
{
|
||||
process.WaitForExit();
|
||||
}
|
||||
process.WaitForExit();
|
||||
}
|
||||
|
||||
public void SetPriority(int processId, ProcessPriorityClass priority)
|
||||
|
Reference in New Issue
Block a user