diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-10-15 22:38:34 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-10-15 22:38:34 +0100 |
commit | d48900e14e41e1b767af6f8461105d5239c3c93e (patch) | |
tree | 48d586a48c980c002fde3e64f2e9db729f46fb0d /src/rspamd.c | |
parent | 665971625a939d5f8e5f41e99636f4e74ebca5d3 (diff) | |
download | rspamd-d48900e14e41e1b767af6f8461105d5239c3c93e.tar.gz rspamd-d48900e14e41e1b767af6f8461105d5239c3c93e.zip |
Block signals when exiting event loop
Diffstat (limited to 'src/rspamd.c')
-rw-r--r-- | src/rspamd.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/rspamd.c b/src/rspamd.c index 21563bf18..2377f8892 100644 --- a/src/rspamd.c +++ b/src/rspamd.c @@ -1043,12 +1043,7 @@ main (gint argc, gchar **argv, gchar **env) event_base_loop (ev_base, 0); /* We need to block signals unless children are waited for */ - sigaddset (&signals.sa_mask, SIGTERM); - sigaddset (&signals.sa_mask, SIGINT); - sigaddset (&signals.sa_mask, SIGHUP); - sigaddset (&signals.sa_mask, SIGUSR1); - sigaddset (&signals.sa_mask, SIGUSR2); - sigprocmask (SIG_BLOCK, &signals.sa_mask, NULL); + rspamd_worker_block_signals (); if (control_fd != -1) { event_del (&control_ev); |