mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-23 23:42:29 +00:00
BugFix - OOMAdjust wrongly runs on all PIDs without a name match
This commit is contained in:
parent
b674c2991e
commit
6d391703e2
@ -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…
Reference in New Issue
Block a user