From 425813061cce696a2d77094a93f6c13d73ccc783 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 31 Oct 2022 20:10:05 +0000 Subject: [PATCH] [Minor] Restore non-blocking semantics for the control socket to avoid deadlocks XXX: it might be osx specific --- src/libserver/worker_util.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libserver/worker_util.c b/src/libserver/worker_util.c index 92ae46bf0..3361377f4 100644 --- a/src/libserver/worker_util.c +++ b/src/libserver/worker_util.c @@ -1179,8 +1179,8 @@ rspamd_handle_child_fork (struct rspamd_worker *wrk, * Read comments in `rspamd_handle_main_fork` for details why these channel * is blocking. */ -#if 0 rspamd_socket_nonblocking (wrk->control_pipe[1]); +#if 0 rspamd_socket_nonblocking (wrk->srv_pipe[1]); #endif rspamd_main->cfg->cur_worker = wrk; @@ -1212,9 +1212,10 @@ rspamd_handle_main_fork (struct rspamd_worker *wrk, * beginning. */ #if 0 - rspamd_socket_nonblocking (wrk->control_pipe[0]); rspamd_socket_nonblocking (wrk->srv_pipe[0]); #endif + rspamd_socket_nonblocking (wrk->control_pipe[0]); + rspamd_srv_start_watching (rspamd_main, wrk, ev_base); /* Child event */ wrk->cld_ev.data = wrk; -- 2.39.5