[hackers] [slock] [PATCH] Slightly safer OOM killer disablement

From: David Phillips <dbphillipsnz_AT_gmail.com>
Date: Fri, 19 Jun 2015 23:22:06 +1200

The old behaviour of slock was to write the hardcoded string "-1000\n"
to `/proc/self/oom_score_adj`. My patch, while a bit less tidy, errs
on the side of caution by deriving this string from OOM_SCORE_ADJ_MIN,
which is defined in `linux/oom.h` as being the score to use to disable
the OOM killer.

I'd be interested in any feedback on this patch, as I feel bad for
submitting a patch which makes code less tidy :-P

-- 
Four word witty remark

Received on Fri Jun 19 2015 - 13:22:06 CEST

This archive was generated by hypermail 2.3.0 : Fri Jun 19 2015 - 13:24:10 CEST