aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2014-08-24 16:54:28 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2014-08-24 16:54:28 +0100
commite08769b6325e2e680911f1fce1f0a21bbeb706ce (patch)
tree152a2e9502c64f3faccfbe502370171700435e09 /src/main.c
parentefd981202a374cc75b2d5d1e61b518267e8527d8 (diff)
downloadrspamd-e08769b6325e2e680911f1fce1f0a21bbeb706ce.tar.gz
rspamd-e08769b6325e2e680911f1fce1f0a21bbeb706ce.zip
Initialize PRG after fork.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index c1fa93815..85553dfc1 100644
--- a/src/main.c
+++ b/src/main.c
@@ -233,6 +233,7 @@ read_cmd_line (gint argc, gchar **argv, struct rspamd_config *cfg)
r = fork ();
if (r == 0) {
/* Spawning new main process */
+ ottery_init (NULL);
cfg->cfg_name = cfg_names[i];
(void)setsid ();
}
@@ -502,6 +503,7 @@ fork_worker (struct rspamd_main *rspamd, struct rspamd_worker_conf *cf)
update_log_pid (cf->type, rspamd->logger);
/* Lock statfile pool if possible */
statfile_pool_lockall (rspamd->statfile_pool);
+ ottery_init (NULL);
/* Drop privilleges */
drop_priv (rspamd);
/* Set limits */
@@ -1310,6 +1312,7 @@ main (gint argc, gchar **argv, gchar **env)
exit (-errno);
}
+ ottery_init (NULL);
/* Write info */
rspamd_main->pid = getpid ();
rspamd_main->type = type;