init.rc: use oom_score_adj instead of oom_adj
Use kernel oom_score_adj interface to make init and children unkillable.
Stop using older, deprecated oom_adj interface.
Use OOM_SCORE_ADJ_MIN to make the processes unkillable (previously the processes
were set to a very low score, but not unkillable).
Change-Id: I680965009585c2a5a580859fb946f2d0caa95d9c
diff --git a/rootdir/init.rc b/rootdir/init.rc
index 27acc9d..d39dd0a 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -11,7 +11,7 @@
on early-init
# Set init and its forked children's oom_adj.
- write /proc/1/oom_adj -16
+ write /proc/1/oom_score_adj -1000
# Set the security context for the init process.
# This should occur before anything else (e.g. ueventd) is started.