diff options
author | Kay Sievers <kay@vrfy.org> | 2012-04-26 01:49:15 +0200 |
---|---|---|
committer | Kay Sievers <kay@vrfy.org> | 2012-04-26 01:49:15 +0200 |
commit | c693ccc0a2a2d44eecf6f5eccaa3d1948c5e9532 (patch) | |
tree | 4e495195e6eacb1e71996b04d72385a1ffbeadcc /src/udev/udevd.c | |
parent | 2028f1cd928142fd57fa63464f63102373c72bbc (diff) |
udev: use only oom_score_adj interface
Diffstat (limited to 'src/udev/udevd.c')
-rw-r--r-- | src/udev/udevd.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/udev/udevd.c b/src/udev/udevd.c index 162551098b..59e2cfac6b 100644 --- a/src/udev/udevd.c +++ b/src/udev/udevd.c @@ -1255,18 +1255,8 @@ int main(int argc, char *argv[]) setsid(); - fd = open("/proc/self/oom_score_adj", O_RDWR); - if (fd < 0) { - /* Fallback to old interface */ - fd = open("/proc/self/oom_adj", O_RDWR); - if (fd < 0) { - log_error("error disabling OOM: %m\n"); - } else { - /* OOM_DISABLE == -17 */ - write(fd, "-17", 3); - close(fd); - } - } else { + fd = open("/proc/self/oom_score_adj", O_RDWR|O_CLOEXEC); + if (fd >= 0) { write(fd, "-1000", 5); close(fd); } |