aboutsummaryrefslogtreecommitdiffstats
path: root/src/cfg_utils.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2009-12-18 17:48:06 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2009-12-18 17:48:06 +0300
commitc6e6ea88a2e03609b0be013d2df0de1c6062712f (patch)
tree7492bb4cb0d47466c900319fa040b0d428560431 /src/cfg_utils.c
parent1b1bcd6966f47a2568acee011dd4b9f18195d765 (diff)
downloadrspamd-c6e6ea88a2e03609b0be013d2df0de1c6062712f.tar.gz
rspamd-c6e6ea88a2e03609b0be013d2df0de1c6062712f.zip
* Add limits support to each worker (max open files and max core size)
* Fix dependency on lex and yacc sources
Diffstat (limited to 'src/cfg_utils.c')
-rw-r--r--src/cfg_utils.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cfg_utils.c b/src/cfg_utils.c
index f8518e164..865c81f7f 100644
--- a/src/cfg_utils.c
+++ b/src/cfg_utils.c
@@ -34,6 +34,9 @@
#define DEFAULT_SCORE 10.0
+#define DEFAULT_RLIMIT_NOFILE 2048
+#define DEFAULT_RLIMIT_MAXCORE 0
+
extern int yylineno;
extern char *yytext;
@@ -644,6 +647,8 @@ check_worker_conf (struct config_file *cfg, struct worker_conf *c)
#else
c->count = DEFAULT_WORKERS_NUM;
#endif
+ c->rlimit_nofile = DEFAULT_RLIMIT_NOFILE;
+ c->rlimit_maxcore = DEFAULT_RLIMIT_MAXCORE;
}
return c;