diff options
author | Kay Sievers <kay@vrfy.org> | 2012-06-04 16:41:10 +0200 |
---|---|---|
committer | Kay Sievers <kay@vrfy.org> | 2012-06-04 16:41:10 +0200 |
commit | 8600c525cb1420570e7670c963abd19c5696b683 (patch) | |
tree | cd5cb6072749f964b958b2c5907c1c9999861a42 /src/core/execute.c | |
parent | d315bba6f6c9d929acdbf3c37cbcf6c9a72365ac (diff) |
remove support for deprecated /proc/self/oom_adj
Diffstat (limited to 'src/core/execute.c')
-rw-r--r-- | src/core/execute.c | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/src/core/execute.c b/src/core/execute.c index 3ef4eafa7f..1b56f6b5f4 100644 --- a/src/core/execute.c +++ b/src/core/execute.c @@ -1129,22 +1129,9 @@ int exec_spawn(ExecCommand *command, char_array_0(t); if (write_one_line_file("/proc/self/oom_score_adj", t) < 0) { - /* Compatibility with Linux <= 2.6.35 */ - - int adj; - - adj = (context->oom_score_adjust * -OOM_DISABLE) / OOM_SCORE_ADJ_MAX; - adj = CLAMP(adj, OOM_DISABLE, OOM_ADJUST_MAX); - - snprintf(t, sizeof(t), "%i", adj); - char_array_0(t); - - if (write_one_line_file("/proc/self/oom_adj", t) < 0 - && errno != EACCES) { - err = -errno; - r = EXIT_OOM_ADJUST; - goto fail_child; - } + err = -errno; + r = EXIT_OOM_ADJUST; + goto fail_child; } } |