commit 4258130: [Minor] Restore non-blocking semantics for the control socket to avoid deadlocks
Vsevolod Stakhov
vsevolod at rspamd.com
Mon Oct 31 20:14:04 UTC 2022
Author: Vsevolod Stakhov
Date: 2022-10-31 20:10:05 +0000
URL: https://github.com/rspamd/rspamd/commit/425813061cce696a2d77094a93f6c13d73ccc783
[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;
More information about the Commits
mailing list