openssh/openssh-deprecated-oom_adj.patch

18 lines
511 B
Diff
Raw Normal View History

--- openbsd-compat/port-linux.c.orig
+++ openbsd-compat/port-linux.c
@@ -208,12 +208,12 @@ ssh_selinux_change_context(const char *n
#endif /* WITH_SELINUX */
#ifdef LINUX_OOM_ADJUST
-#define OOM_ADJ_PATH "/proc/self/oom_adj"
+#define OOM_ADJ_PATH "/proc/self/oom_score_adj"
/*
* The magic "don't kill me", as documented in eg:
* http://lxr.linux.no/#linux+v2.6.32/Documentation/filesystems/proc.txt
*/
-#define OOM_ADJ_NOKILL -17
+#define OOM_ADJ_NOKILL -1000
static int oom_adj_save = INT_MIN;