diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-02-24 17:08:26 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-02-24 17:08:26 +0000 |
commit | e9c050ea60fb5936a84ec71258d41e4a2cc5a6d2 (patch) | |
tree | d0e3ba09093b31da3ccfd3bfc0cfabbd53f1dc7c /src/libutil/mem_pool.c | |
parent | 89cc304a2dde28aaab8e5c7062594b4bc5b70439 (diff) | |
download | rspamd-e9c050ea60fb5936a84ec71258d41e4a2cc5a6d2.tar.gz rspamd-e9c050ea60fb5936a84ec71258d41e4a2cc5a6d2.zip |
Set robust flag for mutexes to avoid dead locks.
Diffstat (limited to 'src/libutil/mem_pool.c')
-rw-r--r-- | src/libutil/mem_pool.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libutil/mem_pool.c b/src/libutil/mem_pool.c index 6c9ee6f16..560ac5539 100644 --- a/src/libutil/mem_pool.c +++ b/src/libutil/mem_pool.c @@ -819,6 +819,7 @@ rspamd_mempool_get_mutex (rspamd_mempool_t * pool) pthread_mutexattr_init (&mattr); pthread_mutexattr_setpshared (&mattr, PTHREAD_PROCESS_SHARED); + pthread_mutexattr_setrobust (&mattr, PTHREAD_MUTEX_ROBUST); pthread_mutex_init (res, &mattr); rspamd_mempool_add_destructor (pool, (rspamd_mempool_destruct_t)pthread_mutex_destroy, res); |