Add bounds on max oom_score_adj value for AdjustOOMScore
oom_score_adj must be in the range -1000 to 1000. In AdjustOOMScore if containerd's score is already at the maximum value we should set that value for the shim instead of trying to set 1001 which is invalid. Signed-off-by: Simon Kaegi <simon_kaegi@ca.ibm.com>
This commit is contained in:
		| @@ -16,6 +16,11 @@ | ||||
|  | ||||
| package sys | ||||
|  | ||||
| const ( | ||||
| 	// OOMScoreAdjMax is not implemented on Windows | ||||
| 	OOMScoreAdjMax = 0 | ||||
| ) | ||||
|  | ||||
| // SetOOMScore sets the oom score for the process | ||||
| // | ||||
| // Not implemented on Windows | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Simon Kaegi
					Simon Kaegi