mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-20 22:14:34 -04:00
Updater will stop process by ID on mono
This commit is contained in:
@@ -21,6 +21,7 @@ namespace NzbDrone.Common.Processes
|
||||
void SetPriority(int processId, ProcessPriorityClass priority);
|
||||
void KillAll(string processName);
|
||||
void Kill(int processId);
|
||||
Boolean Exists(int processId);
|
||||
Boolean Exists(string processName);
|
||||
ProcessPriorityClass GetCurrentProcessPriority();
|
||||
Process Start(string path, string args = null, Action<string> onOutputDataReceived = null, Action<string> onErrorDataReceived = null);
|
||||
@@ -40,6 +41,11 @@ namespace NzbDrone.Common.Processes
|
||||
return ConvertToProcessInfo(Process.GetCurrentProcess());
|
||||
}
|
||||
|
||||
public bool Exists(int processId)
|
||||
{
|
||||
return GetProcessById(processId) != null;
|
||||
}
|
||||
|
||||
public Boolean Exists(string processName)
|
||||
{
|
||||
return GetProcessesByName(processName).Any();
|
||||
|
||||
Reference in New Issue
Block a user