diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-04-04 18:20:48 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-04-04 18:20:48 +0100 |
commit | 37b5f80e6e23639d9deb10707585e3751182784b (patch) | |
tree | 740d7c8679b4582260b014bab9f71a3d506a4105 /src/log_helper.c | |
parent | 69a72071bdeadae86bf1b387f5b3e69266ead1c7 (diff) | |
download | rspamd-37b5f80e6e23639d9deb10707585e3751182784b.tar.gz rspamd-37b5f80e6e23639d9deb10707585e3751182784b.zip |
[Minor] Add startup mutex
Diffstat (limited to 'src/log_helper.c')
-rw-r--r-- | src/log_helper.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/log_helper.c b/src/log_helper.c index 63e824420..b1a241288 100644 --- a/src/log_helper.c +++ b/src/log_helper.c @@ -144,8 +144,11 @@ start_log_helper (struct rspamd_worker *worker) srv_cmd.type = RSPAMD_SRV_LOG_PIPE; srv_cmd.cmd.log_pipe.type = RSPAMD_LOG_PIPE_SYMBOLS; + /* Wait for startup being completed */ + rspamd_mempool_lock_mutex (worker->srv->start_mtx); rspamd_srv_send_command (worker, ctx->ev_base, &srv_cmd, ctx->pair[1], rspamd_log_helper_reply_handler, ctx); + rspamd_mempool_unlock_mutex (worker->srv->start_mtx); event_base_loop (ctx->ev_base, 0); close (ctx->pair[0]); rspamd_worker_block_signals (); |