mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-03-23 12:35:44 +00:00
Merge pull request #81 from resin-io/psutils_name_match_bug
BugFix - OOMAdjust wrongly runs on all PIDs without a name match
This commit is contained in:
commit
0a0d2ddd35
@ -35,7 +35,7 @@ func (procs *Procs) AdjustOOMPriorityByName(processName string, value int, ignor
|
||||
// Find the process with the given name
|
||||
if currProcess, err := process.NewProcess(pid); err != nil {
|
||||
continue
|
||||
} else if name, err := currProcess.Name(); err != nil && name != processName {
|
||||
} else if name, err := currProcess.Name(); err != nil || name != processName {
|
||||
continue
|
||||
} else if err := procs.AdjustOOMPriority(int(pid), value, ignoreIfNonZero); err == nil {
|
||||
found = true
|
||||
|
Loading…
x
Reference in New Issue
Block a user