]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Restore non-blocking semantics for the control socket to avoid deadlocks
authorVsevolod Stakhov <vsevolod@rspamd.com>
Mon, 31 Oct 2022 20:10:05 +0000 (20:10 +0000)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Mon, 31 Oct 2022 20:10:05 +0000 (20:10 +0000)
XXX: it might be osx specific

src/libserver/worker_util.c

index 92ae46bf0ee24a45f1712e2f62767a5d91a05f74..3361377f418de8131d2e1a645a5f00d33115f0f3 100644 (file)
@@ -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;