summaryrefslogtreecommitdiff
path: root/accel-pptpd
diff options
context:
space:
mode:
authorKozlov Dmitry <dima@server>2010-10-08 14:28:25 +0400
committerKozlov Dmitry <dima@server>2010-10-08 14:28:25 +0400
commit11494a00c14d7cbd1f3793245a51e274b383ca57 (patch)
treea58f6c125ad0a2fa65a354a1175f52d8b1fa4cc2 /accel-pptpd
parent24ed88f365d967d2475aa5b6950e1707f8972417 (diff)
downloadaccel-ppp-11494a00c14d7cbd1f3793245a51e274b383ca57.tar.gz
accel-ppp-11494a00c14d7cbd1f3793245a51e274b383ca57.zip
increase number of maximum opened files to system maximum
Diffstat (limited to 'accel-pptpd')
-rw-r--r--accel-pptpd/main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/accel-pptpd/main.c b/accel-pptpd/main.c
index ede3732..c279574 100644
--- a/accel-pptpd/main.c
+++ b/accel-pptpd/main.c
@@ -95,8 +95,10 @@ static void change_limits(void)
fscanf(f, "%d", &file_max);
fclose(f);
+ lim.rlim_cur = file_max;
+ lim.rlim_max = file_max;
if (setrlimit(RLIMIT_NOFILE, &lim))
- log_emerg("main: setrlimit: %s", strerror(errno));
+ log_emerg("main: setrlimit: %s\n", strerror(errno));
} else
log_emerg("main: failed to open '/proc/sys/fs/file-max': %s\n", strerror(errno));
}