aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/util.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-07-25 08:45:11 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-07-25 08:45:11 +0100
commit38b1875ccd7af3e1863b1e6d52af3e67419ffdeb (patch)
treede5c00b0bc7f853688dd38c529f833f6b5f7a3a6 /src/libutil/util.c
parent29820f8a7bd23a446a5dee829d812295c254a487 (diff)
downloadrspamd-38b1875ccd7af3e1863b1e6d52af3e67419ffdeb.tar.gz
rspamd-38b1875ccd7af3e1863b1e6d52af3e67419ffdeb.zip
[Fix] Fix setting of signals when spawning a thread
Diffstat (limited to 'src/libutil/util.c')
-rw-r--r--src/libutil/util.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libutil/util.c b/src/libutil/util.c
index b94de00b9..55fd7c2a2 100644
--- a/src/libutil/util.c
+++ b/src/libutil/util.c
@@ -1618,7 +1618,6 @@ rspamd_thread_func (gpointer ud)
/* Ignore signals in thread */
sigemptyset (&s_mask);
- sigaddset (&s_mask, SIGTERM);
sigaddset (&s_mask, SIGINT);
sigaddset (&s_mask, SIGHUP);
sigaddset (&s_mask, SIGCHLD);
@@ -1627,7 +1626,7 @@ rspamd_thread_func (gpointer ud)
sigaddset (&s_mask, SIGALRM);
sigaddset (&s_mask, SIGPIPE);
- sigprocmask (SIG_BLOCK, &s_mask, NULL);
+ pthread_sigmask (SIG_BLOCK, &s_mask, NULL);
ud = td->func (td->data);
g_free (td->name);