|
|
@ -330,16 +330,7 @@ namespace NzbDrone.Common.Processes
|
|
|
|
|
|
|
|
|
|
|
|
private List<Process> GetProcessesByName(string name)
|
|
|
|
private List<Process> GetProcessesByName(string name)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
//TODO: move this to an OS specific class
|
|
|
|
var processes = Process.GetProcessesByName(name).ToList();
|
|
|
|
var monoProcesses = Process.GetProcessesByName("mono")
|
|
|
|
|
|
|
|
.Union(Process.GetProcessesByName("mono-sgen"))
|
|
|
|
|
|
|
|
.Where(process =>
|
|
|
|
|
|
|
|
process.Modules.Cast<ProcessModule>()
|
|
|
|
|
|
|
|
.Any(module =>
|
|
|
|
|
|
|
|
module.ModuleName.ToLower() == name.ToLower() + ".exe"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var processes = Process.GetProcessesByName(name)
|
|
|
|
|
|
|
|
.Union(monoProcesses).ToList();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_logger.Debug("Found {0} processes with the name: {1}", processes.Count, name);
|
|
|
|
_logger.Debug("Found {0} processes with the name: {1}", processes.Count, name);
|
|
|
|
|
|
|
|
|
|
|
|