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
This commit is contained in:
Todd Poynor 2013-09-16 19:32:03 -07:00
parent 16b6099476
commit 4676550b56

View file

@ -11,7 +11,7 @@ import /init.trace.rc
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.