From 11494a00c14d7cbd1f3793245a51e274b383ca57 Mon Sep 17 00:00:00 2001 From: Kozlov Dmitry Date: Fri, 8 Oct 2010 14:28:25 +0400 Subject: increase number of maximum opened files to system maximum --- accel-pptpd/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'accel-pptpd') diff --git a/accel-pptpd/main.c b/accel-pptpd/main.c index ede3732d..c279574e 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)); } -- cgit v1.2.3