aboutsummaryrefslogtreecommitdiffstats
path: root/nldev.c
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2015-03-12 21:00:36 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2015-03-12 21:00:36 +0100
commitdda4fbd59099f572471ebf12af225f3052faac6c (patch)
tree6781c768bc419f8a907a25e6f7ffa82a0a4465b6 /nldev.c
parent8aa86aa2b72d1cb0aa5b876d4841eff4eb3b8915 (diff)
downloadnldev-dda4fbd59099f572471ebf12af225f3052faac6c.tar.bz2
nldev-dda4fbd59099f572471ebf12af225f3052faac6c.tar.xz
nldev: remove disableoom
This logic does not need to be in the always-in-memory code. Instead, let the caller handle it. Something like this can be used: http://b0llix.net/perp/site.cgi?page=runchoom.8
Diffstat (limited to 'nldev.c')
-rw-r--r--nldev.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/nldev.c b/nldev.c
index e57ad0f..9128c51 100644
--- a/nldev.c
+++ b/nldev.c
@@ -34,24 +34,6 @@ struct handler {
};
void
-disableoom(void)
-{
- int fd;
-
- fd = open("/proc/self/oom_score_adj", O_RDWR);
- if (fd < 0) {
- fd = open("/proc/self/oom_adj", O_RDWR);
- if (fd < 0)
- edie("disabling oom failed.");
- write(fd, "-17", 3);
- close(fd);
- } else {
- write(fd, "-1000", 5);
- close(fd);
- }
-}
-
-void
spawn_handler(struct handler *child)
{
int pipefd[2];
@@ -206,7 +188,6 @@ main(int argc, char *argv[])
}
initsignals();
- disableoom();
buf[sizeof(buf)-1] = '\0';
while (poll(fds, 2, -1) > -1) {