From b432efd029346b9d6f34b43c30bc262855311bcd Mon Sep 17 00:00:00 2001 From: spacewander Date: Wed, 30 Nov 2022 11:58:37 +0800 Subject: [PATCH] feat: enable threads for privileged agent Signed-off-by: spacewander --- .../nginx-privileged_agent_process_thread.patch | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 patch/1.21.4/nginx-privileged_agent_process_thread.patch diff --git a/patch/1.21.4/nginx-privileged_agent_process_thread.patch b/patch/1.21.4/nginx-privileged_agent_process_thread.patch new file mode 100644 index 0000000..59160a1 --- /dev/null +++ b/patch/1.21.4/nginx-privileged_agent_process_thread.patch @@ -0,0 +1,14 @@ +diff --git src/core/ngx_thread_pool.c src/core/ngx_thread_pool.c +index 7fb0f7f..95081a6 100644 +--- src/core/ngx_thread_pool.c ++++ src/core/ngx_thread_pool.c +@@ -587,6 +587,9 @@ ngx_thread_pool_init_worker(ngx_cycle_t *cycle) + ngx_thread_pool_conf_t *tcf; + + if (ngx_process != NGX_PROCESS_WORKER ++#if HAVE_PRIVILEGED_PROCESS_PATCH ++ && !ngx_is_privileged_agent ++#endif + && ngx_process != NGX_PROCESS_SINGLE) + { + return NGX_OK;