From: Vsevolod Stakhov Date: Sun, 24 Aug 2014 15:54:28 +0000 (+0100) Subject: Initialize PRG after fork. X-Git-Tag: 0.7.0~102 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e08769b6325e2e680911f1fce1f0a21bbeb706ce;p=thirdparty%2Frspamd.git Initialize PRG after fork. --- diff --git a/src/main.c b/src/main.c index c1fa93815b..85553dfc1b 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;