NGINX: Bump to OpenResty v1.27.1.1. (#12229)
This commit is contained in:
parent
29d1e2014b
commit
1ece0ddbc1
34 changed files with 176 additions and 100 deletions
|
@ -18,18 +18,18 @@ set -o errexit
|
|||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
export NGINX_VERSION=1.25.5
|
||||
export NGINX_VERSION=1.27.1
|
||||
|
||||
# Check for recent changes: https://github.com/vision5/ngx_devel_kit/compare/v0.3.3...master
|
||||
export NDK_VERSION=v0.3.3
|
||||
|
||||
# Check for recent changes: https://github.com/openresty/set-misc-nginx-module/compare/v0.33...master
|
||||
export SETMISC_VERSION=796f5a3e518748eb29a93bd450324e0ad45b704e
|
||||
export SETMISC_VERSION=v0.33
|
||||
|
||||
# Check for recent changes: https://github.com/openresty/headers-more-nginx-module/compare/v0.37...master
|
||||
export MORE_HEADERS_VERSION=v0.37
|
||||
|
||||
# Check for recent changes: https://github.com/atomx/nginx-http-auth-digest/compare/v1.0.0...atomx:master
|
||||
# Check for recent changes: https://github.com/atomx/nginx-http-auth-digest/compare/v1.0.0...master
|
||||
export NGINX_DIGEST_AUTH=v1.0.0
|
||||
|
||||
# Check for recent changes: https://github.com/SpiderLabs/ModSecurity-nginx/compare/v1.0.3...master
|
||||
|
@ -41,62 +41,62 @@ export MODSECURITY_LIB_VERSION=v3.0.13
|
|||
# Check for recent changes: https://github.com/coreruleset/coreruleset/compare/v4.10.0...main
|
||||
export OWASP_MODSECURITY_CRS_VERSION=v4.10.0
|
||||
|
||||
# Check for recent changes: https://github.com/openresty/lua-nginx-module/compare/v0.10.26``...master
|
||||
export LUA_NGX_VERSION=v0.10.26
|
||||
# Check for recent changes: https://github.com/openresty/lua-nginx-module/compare/v0.10.27...master
|
||||
export LUA_NGX_VERSION=v0.10.27
|
||||
|
||||
# Check for recent changes: https://github.com/openresty/stream-lua-nginx-module/compare/bea8a0c0de94cede71554f53818ac0267d675d63...master
|
||||
export LUA_STREAM_NGX_VERSION=bea8a0c0de94cede71554f53818ac0267d675d63
|
||||
# Check for recent changes: https://github.com/openresty/stream-lua-nginx-module/compare/v0.0.15...master
|
||||
export LUA_STREAM_NGX_VERSION=v0.0.15
|
||||
|
||||
# Check for recent changes: https://github.com/openresty/lua-upstream-nginx-module/compare/8aa93ead98ba2060d4efd594ae33a35d153589bf...master
|
||||
export LUA_UPSTREAM_VERSION=542be0893543a4e42d89f6dd85372972f5ff2a36
|
||||
# Check for recent changes: https://github.com/openresty/lua-upstream-nginx-module/compare/v0.07...master
|
||||
export LUA_UPSTREAM_VERSION=v0.07
|
||||
|
||||
# Check for recent changes: https://github.com/openresty/lua-cjson/compare/2.1.0.13...openresty:master
|
||||
export LUA_CJSON_VERSION=2.1.0.13
|
||||
# Check for recent changes: https://github.com/openresty/lua-cjson/compare/2.1.0.14...master
|
||||
export LUA_CJSON_VERSION=2.1.0.14
|
||||
|
||||
# Check for recent changes: https://github.com/leev/ngx_http_geoip2_module/compare/a607a41a8115fecfc05b5c283c81532a3d605425...master
|
||||
export GEOIP2_VERSION=a607a41a8115fecfc05b5c283c81532a3d605425
|
||||
# Check for recent changes: https://github.com/leev/ngx_http_geoip2_module/compare/445df24ef3781e488cee3dfe8a1e111997fc1dfe...master
|
||||
export GEOIP2_VERSION=445df24ef3781e488cee3dfe8a1e111997fc1dfe
|
||||
|
||||
# Check for recent changes: https://github.com/openresty/luajit2/compare/v2.1-20240314...v2.1-agentzh
|
||||
export LUAJIT_VERSION=v2.1-20240314
|
||||
# Check for recent changes: https://github.com/openresty/luajit2/compare/v2.1-20240815...v2.1-agentzh
|
||||
export LUAJIT_VERSION=v2.1-20240815
|
||||
|
||||
# Check for recent changes: https://github.com/openresty/lua-resty-balancer/compare/1cd4363c0a239afe4765ec607dcfbbb4e5900eea...master
|
||||
export LUA_RESTY_BALANCER=1cd4363c0a239afe4765ec607dcfbbb4e5900eea
|
||||
# Check for recent changes: https://github.com/openresty/lua-resty-balancer/compare/v0.05...master
|
||||
export LUA_RESTY_BALANCER=v0.05
|
||||
|
||||
# Check for recent changes: https://github.com/openresty/lua-resty-lrucache/compare/99e7578465b40f36f596d099b82eab404f2b42ed...master
|
||||
export LUA_RESTY_CACHE=99e7578465b40f36f596d099b82eab404f2b42ed
|
||||
# Check for recent changes: https://github.com/openresty/lua-resty-lrucache/compare/v0.15...master
|
||||
export LUA_RESTY_CACHE=v0.15
|
||||
|
||||
# Check for recent changes: https://github.com/openresty/lua-resty-core/compare/v0.1.27...master
|
||||
export LUA_RESTY_CORE=v0.1.28
|
||||
# Check for recent changes: https://github.com/openresty/lua-resty-core/compare/v0.1.30...master
|
||||
export LUA_RESTY_CORE=v0.1.30
|
||||
|
||||
# Check for recent changes: https://github.com/cloudflare/lua-resty-cookie/compare/f418d77082eaef48331302e84330488fdc810ef4...master
|
||||
export LUA_RESTY_COOKIE_VERSION=f418d77082eaef48331302e84330488fdc810ef4
|
||||
|
||||
# Check for recent changes: https://github.com/openresty/lua-resty-dns/compare/8bb53516e2933e61c317db740a9b7c2048847c2f...master
|
||||
export LUA_RESTY_DNS=8bb53516e2933e61c317db740a9b7c2048847c2f
|
||||
# Check for recent changes: https://github.com/openresty/lua-resty-dns/compare/v0.23...master
|
||||
export LUA_RESTY_DNS=v0.23
|
||||
|
||||
# Check for recent changes: https://github.com/ledgetech/lua-resty-http/compare/v0.17.1...master
|
||||
export LUA_RESTY_HTTP=v0.17.1
|
||||
# Check for recent changes: https://github.com/ledgetech/lua-resty-http/compare/v0.17.2...master
|
||||
export LUA_RESTY_HTTP=v0.17.2
|
||||
|
||||
# Check for recent changes: https://github.com/openresty/lua-resty-lock/compare/v0.09...master
|
||||
export LUA_RESTY_LOCK=405d0bf4cbfa74d742c6ed3158d442221e6212a9
|
||||
export LUA_RESTY_LOCK=v0.09
|
||||
|
||||
# Check for recent changes: https://github.com/openresty/lua-resty-upload/compare/v0.11...master
|
||||
export LUA_RESTY_UPLOAD_VERSION=979372cce011f3176af3c9aff53fd0e992c4bfd3
|
||||
export LUA_RESTY_UPLOAD_VERSION=v0.11
|
||||
|
||||
# Check for recent changes: https://github.com/openresty/lua-resty-string/compare/v0.15...master
|
||||
export LUA_RESTY_STRING_VERSION=6f1bc21d86daef804df3cc34d6427ef68da26844
|
||||
# Check for recent changes: https://github.com/openresty/lua-resty-string/compare/v0.16...master
|
||||
export LUA_RESTY_STRING_VERSION=v0.16
|
||||
|
||||
# Check for recent changes: https://github.com/openresty/lua-resty-memcached/compare/v0.17...master
|
||||
export LUA_RESTY_MEMCACHED_VERSION=2f02b68bf65fa2332cce070674a93a69a6c7239b
|
||||
export LUA_RESTY_MEMCACHED_VERSION=v0.17
|
||||
|
||||
# Check for recent changes: https://github.com/openresty/lua-resty-redis/compare/v0.30...master
|
||||
export LUA_RESTY_REDIS_VERSION=8641b9f1b6f75cca50c90cf8ca5c502ad8950aa8
|
||||
# Check for recent changes: https://github.com/openresty/lua-resty-redis/compare/v0.31...master
|
||||
export LUA_RESTY_REDIS_VERSION=v0.31
|
||||
|
||||
# Check for recent changes: https://github.com/api7/lua-resty-ipmatcher/compare/v0.6.1...master
|
||||
# Check for recent changes: https://github.com/api7/lua-resty-ipmatcher/compare/3e93c53eb8c9884efe939ef070486a0e507cc5be...master
|
||||
export LUA_RESTY_IPMATCHER_VERSION=3e93c53eb8c9884efe939ef070486a0e507cc5be
|
||||
|
||||
# Check for recent changes: https://github.com/microsoft/mimalloc/compare/v2.1.7...master
|
||||
export MIMALOC_VERSION=v2.1.7
|
||||
# Check for recent changes: https://github.com/microsoft/mimalloc/compare/v2.1.9...master
|
||||
export MIMALOC_VERSION=v2.1.9
|
||||
|
||||
# Check for recent changes: https://github.com/open-telemetry/opentelemetry-cpp/compare/v1.18.0...main
|
||||
export OPENTELEMETRY_CPP_VERSION="v1.18.0"
|
||||
|
@ -318,8 +318,7 @@ git config --global --add core.compression -1
|
|||
cd "$BUILD_PATH"
|
||||
git clone --depth=100 https://github.com/google/ngx_brotli.git
|
||||
cd ngx_brotli
|
||||
# https://github.com/google/ngx_brotli/issues/156
|
||||
git reset --hard 63ca02abdcf79c9e788d2eedcc388d2335902e52
|
||||
git reset --hard a71f9312c2deb28875acc7bacfdd5695a111aa53
|
||||
git submodule init
|
||||
git submodule update
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
diff -u -r -p -Naur nginx-1.25.3/src/stream/ngx_stream.h nginx-1.25.3-patched/src/stream/ngx_stream.h
|
||||
--- nginx-1.25.3/src/stream/ngx_stream.h 2021-11-04 21:27:55.288708527 +0800
|
||||
+++ nginx-1.25.3-patched/src/stream/ngx_stream.h 2021-11-04 21:28:50.768035209 +0800
|
||||
diff -u -r -p -Naur nginx-1.27.1/src/stream/ngx_stream.h nginx-1.27.1-patched/src/stream/ngx_stream.h
|
||||
--- nginx-1.27.1/src/stream/ngx_stream.h 2021-11-04 21:27:55.288708527 +0800
|
||||
+++ nginx-1.27.1-patched/src/stream/ngx_stream.h 2021-11-04 21:28:50.768035209 +0800
|
||||
@@ -254,6 +254,15 @@ typedef struct {
|
||||
} ngx_stream_module_t;
|
||||
|
||||
|
@ -25,9 +25,9 @@ diff -u -r -p -Naur nginx-1.25.3/src/stream/ngx_stream.h nginx-1.25.3-patched/sr
|
|||
|
||||
|
||||
typedef ngx_int_t (*ngx_stream_filter_pt)(ngx_stream_session_t *s,
|
||||
diff -u -r -p -Naur nginx-1.25.3/src/stream/ngx_stream_proxy_module.c nginx-1.25.3-patched/src/stream/ngx_stream_proxy_module.c
|
||||
--- nginx-1.25.3/src/stream/ngx_stream_proxy_module.c 2021-11-04 21:27:55.289708533 +0800
|
||||
+++ nginx-1.25.3-patched/src/stream/ngx_stream_proxy_module.c 2021-11-04 21:37:03.578936990 +0800
|
||||
diff -u -r -p -Naur nginx-1.27.1/src/stream/ngx_stream_proxy_module.c nginx-1.27.1-patched/src/stream/ngx_stream_proxy_module.c
|
||||
--- nginx-1.27.1/src/stream/ngx_stream_proxy_module.c 2021-11-04 21:27:55.289708533 +0800
|
||||
+++ nginx-1.27.1-patched/src/stream/ngx_stream_proxy_module.c 2021-11-04 21:37:03.578936990 +0800
|
||||
@@ -400,6 +400,7 @@ ngx_stream_proxy_handler(ngx_stream_sess
|
||||
ngx_stream_proxy_srv_conf_t *pscf;
|
||||
ngx_stream_upstream_srv_conf_t *uscf, **uscfp;
|
|
@ -1,6 +1,6 @@
|
|||
diff -rup nginx-1.25.3/src/core/nginx.c nginx-1.25.3-patched/src/core/nginx.c
|
||||
--- nginx-1.25.3/src/core/nginx.c 2017-12-17 00:00:38.136470108 -0800
|
||||
+++ nginx-1.25.3-patched/src/core/nginx.c 2017-12-16 23:59:51.680958322 -0800
|
||||
diff -rup nginx-1.27.1/src/core/nginx.c nginx-1.27.1-patched/src/core/nginx.c
|
||||
--- nginx-1.27.1/src/core/nginx.c 2017-12-17 00:00:38.136470108 -0800
|
||||
+++ nginx-1.27.1-patched/src/core/nginx.c 2017-12-16 23:59:51.680958322 -0800
|
||||
@@ -186,6 +186,7 @@ static u_char *ngx_prefix;
|
||||
static u_char *ngx_conf_file;
|
||||
static u_char *ngx_conf_params;
|
||||
|
@ -18,9 +18,9 @@ diff -rup nginx-1.25.3/src/core/nginx.c nginx-1.25.3-patched/src/core/nginx.c
|
|||
if (ngx_save_argv(&init_cycle, argc, argv) != NGX_OK) {
|
||||
return 1;
|
||||
}
|
||||
diff -rup nginx-1.25.3/src/core/ngx_core.h nginx-1.25.3-patched/src/core/ngx_core.h
|
||||
--- nginx-1.25.3/src/core/ngx_core.h 2017-10-10 08:22:51.000000000 -0700
|
||||
+++ nginx-1.25.3-patched/src/core/ngx_core.h 2017-12-16 23:59:51.679958370 -0800
|
||||
diff -rup nginx-1.27.1/src/core/ngx_core.h nginx-1.27.1-patched/src/core/ngx_core.h
|
||||
--- nginx-1.27.1/src/core/ngx_core.h 2017-10-10 08:22:51.000000000 -0700
|
||||
+++ nginx-1.27.1-patched/src/core/ngx_core.h 2017-12-16 23:59:51.679958370 -0800
|
||||
@@ -108,4 +108,6 @@ void ngx_cpuinfo(void);
|
||||
#define NGX_DISABLE_SYMLINKS_NOTOWNER 2
|
||||
#endif
|
||||
|
@ -28,9 +28,9 @@ diff -rup nginx-1.25.3/src/core/ngx_core.h nginx-1.25.3-patched/src/core/ngx_cor
|
|||
+extern ngx_pool_t *saved_init_cycle_pool;
|
||||
+
|
||||
#endif /* _NGX_CORE_H_INCLUDED_ */
|
||||
diff -rup nginx-1.25.3/src/core/ngx_cycle.c nginx-1.25.3-patched/src/core/ngx_cycle.c
|
||||
--- nginx-1.25.3/src/core/ngx_cycle.c 2017-10-10 08:22:51.000000000 -0700
|
||||
+++ nginx-1.25.3-patched/src/core/ngx_cycle.c 2017-12-16 23:59:51.678958419 -0800
|
||||
diff -rup nginx-1.27.1/src/core/ngx_cycle.c nginx-1.27.1-patched/src/core/ngx_cycle.c
|
||||
--- nginx-1.27.1/src/core/ngx_cycle.c 2017-10-10 08:22:51.000000000 -0700
|
||||
+++ nginx-1.27.1-patched/src/core/ngx_cycle.c 2017-12-16 23:59:51.678958419 -0800
|
||||
@@ -748,6 +748,10 @@ old_shm_zone_done:
|
||||
|
||||
if (ngx_process == NGX_PROCESS_MASTER || ngx_is_init_cycle(old_cycle)) {
|
||||
|
@ -42,9 +42,9 @@ diff -rup nginx-1.25.3/src/core/ngx_cycle.c nginx-1.25.3-patched/src/core/ngx_cy
|
|||
ngx_destroy_pool(old_cycle->pool);
|
||||
cycle->old_cycle = NULL;
|
||||
|
||||
diff -rup nginx-1.25.3/src/os/unix/ngx_process_cycle.c nginx-1.25.3-patched/src/os/unix/ngx_process_cycle.c
|
||||
--- nginx-1.25.3/src/os/unix/ngx_process_cycle.c 2017-12-17 00:00:38.142469762 -0800
|
||||
+++ nginx-1.25.3-patched/src/os/unix/ngx_process_cycle.c 2017-12-16 23:59:51.691957791 -0800
|
||||
diff -rup nginx-1.27.1/src/os/unix/ngx_process_cycle.c nginx-1.27.1-patched/src/os/unix/ngx_process_cycle.c
|
||||
--- nginx-1.27.1/src/os/unix/ngx_process_cycle.c 2017-12-17 00:00:38.142469762 -0800
|
||||
+++ nginx-1.27.1-patched/src/os/unix/ngx_process_cycle.c 2017-12-16 23:59:51.691957791 -0800
|
||||
@@ -687,6 +692,11 @@ ngx_master_process_exit(ngx_cycle_t *cyc
|
||||
ngx_exit_cycle.files_n = ngx_cycle->files_n;
|
||||
ngx_cycle = &ngx_exit_cycle;
|
|
@ -1,6 +1,6 @@
|
|||
diff -upr nginx-1.25.3/src/http/ngx_http_core_module.c nginx-1.25.3-patched/src/http/ngx_http_core_module.c
|
||||
--- nginx-1.25.3/src/http/ngx_http_core_module.c 2017-08-31 18:14:41.000000000 -0700
|
||||
+++ nginx-1.25.3-patched/src/http/ngx_http_core_module.c 2017-08-31 18:21:31.638098196 -0700
|
||||
diff -upr nginx-1.27.1/src/http/ngx_http_core_module.c nginx-1.27.1-patched/src/http/ngx_http_core_module.c
|
||||
--- nginx-1.27.1/src/http/ngx_http_core_module.c 2017-08-31 18:14:41.000000000 -0700
|
||||
+++ nginx-1.27.1-patched/src/http/ngx_http_core_module.c 2017-08-31 18:21:31.638098196 -0700
|
||||
@@ -64,6 +64,8 @@ static char *ngx_http_core_directio(ngx_conf_t *cf, ngx_command_t *cmd,
|
||||
void *conf);
|
||||
static char *ngx_http_core_error_page(ngx_conf_t *cf, ngx_command_t *cmd,
|
|
@ -1,36 +0,0 @@
|
|||
diff -urp nginx-1.25.3/auto/cc/clang nginx-1.25.3-patched/auto/cc/clang
|
||||
--- nginx-1.25.3/auto/cc/clang 2014-03-04 03:39:24.000000000 -0800
|
||||
+++ nginx-1.25.3-patched/auto/cc/clang 2014-03-13 20:54:26.241413360 -0700
|
||||
@@ -89,7 +89,7 @@ CFLAGS="$CFLAGS -Wconditional-uninitiali
|
||||
CFLAGS="$CFLAGS -Wno-unused-parameter"
|
||||
|
||||
# stop on warning
|
||||
-CFLAGS="$CFLAGS -Werror"
|
||||
+#CFLAGS="$CFLAGS -Werror"
|
||||
|
||||
# debug
|
||||
CFLAGS="$CFLAGS -g"
|
||||
diff -urp nginx-1.25.3/auto/cc/gcc nginx-1.25.3-patched/auto/cc/gcc
|
||||
--- nginx-1.25.3/auto/cc/gcc 2014-03-04 03:39:24.000000000 -0800
|
||||
+++ nginx-1.25.3-patched/auto/cc/gcc 2014-03-13 20:54:13.301355329 -0700
|
||||
@@ -168,7 +168,7 @@ esac
|
||||
|
||||
|
||||
# stop on warning
|
||||
-CFLAGS="$CFLAGS -Werror"
|
||||
+#CFLAGS="$CFLAGS -Werror"
|
||||
|
||||
# debug
|
||||
CFLAGS="$CFLAGS -g"
|
||||
diff -urp nginx-1.25.3/auto/cc/icc nginx-1.25.3-patched/auto/cc/icc
|
||||
--- nginx-1.25.3/auto/cc/icc 2014-03-04 03:39:24.000000000 -0800
|
||||
+++ nginx-1.25.3-patched/auto/cc/icc 2014-03-13 20:54:13.301355329 -0700
|
||||
@@ -115,7 +115,7 @@ case "$NGX_ICC_VER" in
|
||||
esac
|
||||
|
||||
# stop on warning
|
||||
-CFLAGS="$CFLAGS -Werror"
|
||||
+#CFLAGS="$CFLAGS -Werror"
|
||||
|
||||
# debug
|
||||
CFLAGS="$CFLAGS -g"
|
36
images/nginx/rootfs/patches/18_nginx-1.27.1-no_Werror.patch
Normal file
36
images/nginx/rootfs/patches/18_nginx-1.27.1-no_Werror.patch
Normal file
|
@ -0,0 +1,36 @@
|
|||
diff -urp nginx-1.27.1/auto/cc/clang nginx-1.27.1-patched/auto/cc/clang
|
||||
--- nginx-1.27.1/auto/cc/clang 2014-03-04 03:39:24.000000000 -0800
|
||||
+++ nginx-1.27.1-patched/auto/cc/clang 2014-03-13 20:54:26.241413360 -0700
|
||||
@@ -89,7 +89,7 @@ CFLAGS="$CFLAGS -Wconditional-uninitiali
|
||||
CFLAGS="$CFLAGS -Wno-unused-parameter"
|
||||
|
||||
# stop on warning
|
||||
-CFLAGS="$CFLAGS -Werror"
|
||||
+#CFLAGS="$CFLAGS -Werror"
|
||||
|
||||
# debug
|
||||
CFLAGS="$CFLAGS -g"
|
||||
diff -urp nginx-1.27.1/auto/cc/gcc nginx-1.27.1-patched/auto/cc/gcc
|
||||
--- nginx-1.27.1/auto/cc/gcc 2014-03-04 03:39:24.000000000 -0800
|
||||
+++ nginx-1.27.1-patched/auto/cc/gcc 2014-03-13 20:54:13.301355329 -0700
|
||||
@@ -168,7 +168,7 @@ esac
|
||||
|
||||
|
||||
# stop on warning
|
||||
-CFLAGS="$CFLAGS -Werror"
|
||||
+#CFLAGS="$CFLAGS -Werror"
|
||||
|
||||
# debug
|
||||
CFLAGS="$CFLAGS -g"
|
||||
diff -urp nginx-1.27.1/auto/cc/icc nginx-1.27.1-patched/auto/cc/icc
|
||||
--- nginx-1.27.1/auto/cc/icc 2014-03-04 03:39:24.000000000 -0800
|
||||
+++ nginx-1.27.1-patched/auto/cc/icc 2014-03-13 20:54:13.301355329 -0700
|
||||
@@ -115,7 +115,7 @@ case "$NGX_ICC_VER" in
|
||||
esac
|
||||
|
||||
# stop on warning
|
||||
-CFLAGS="$CFLAGS -Werror"
|
||||
+#CFLAGS="$CFLAGS -Werror"
|
||||
|
||||
# debug
|
||||
CFLAGS="$CFLAGS -g"
|
|
@ -1,5 +1,5 @@
|
|||
--- nginx-1.25.3/src/http/modules/ngx_http_proxy_module.c 2017-07-16 14:02:51.000000000 +0800
|
||||
+++ nginx-1.25.3-patched/src/http/modules/ngx_http_proxy_module.c 2017-07-16 14:02:51.000000000 +0800
|
||||
--- nginx-1.27.1/src/http/modules/ngx_http_proxy_module.c 2017-07-16 14:02:51.000000000 +0800
|
||||
+++ nginx-1.27.1-patched/src/http/modules/ngx_http_proxy_module.c 2017-07-16 14:02:51.000000000 +0800
|
||||
@@ -793,13 +793,13 @@ static ngx_keyval_t ngx_http_proxy_cach
|
||||
static ngx_http_variable_t ngx_http_proxy_vars[] = {
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
--- nginx-1.25.3/src/core/ngx_log.h 2013-10-08 05:07:14.000000000 -0700
|
||||
+++ nginx-1.25.3-patched/src/core/ngx_log.h 2013-12-05 20:35:35.996236720 -0800
|
||||
--- nginx-1.27.1/src/core/ngx_log.h 2013-10-08 05:07:14.000000000 -0700
|
||||
+++ nginx-1.27.1-patched/src/core/ngx_log.h 2013-12-05 20:35:35.996236720 -0800
|
||||
@@ -64,7 +64,9 @@ struct ngx_log_s {
|
||||
};
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
--- nginx-1.25.3/auto/cc/conf 2015-10-30 22:47:50.000000000 +0800
|
||||
+++ nginx-1.25.3-patched/auto/cc/conf 2015-11-02 12:23:05.385156987 +0800
|
||||
--- nginx-1.27.1/auto/cc/conf 2015-10-30 22:47:50.000000000 +0800
|
||||
+++ nginx-1.27.1-patched/auto/cc/conf 2015-11-02 12:23:05.385156987 +0800
|
||||
@@ -144,7 +144,7 @@ fi
|
||||
CFLAGS="$CFLAGS $NGX_CC_OPT"
|
||||
NGX_TEST_LD_OPT="$NGX_LD_OPT"
|
|
@ -0,0 +1,77 @@
|
|||
diff --git a/src/core/ngx_cycle.c b/src/core/ngx_cycle.c
|
||||
index c4e3c50..fa1408b 100644
|
||||
--- a/src/core/ngx_cycle.c
|
||||
+++ b/src/core/ngx_cycle.c
|
||||
@@ -264,6 +264,9 @@ ngx_init_cycle(ngx_cycle_t *old_cycle)
|
||||
}
|
||||
|
||||
|
||||
+#if !(NGX_WIN32)
|
||||
+ ngx_proc_exit_top_handler = ngx_proc_exit_def_handler;
|
||||
+#endif
|
||||
conf.ctx = cycle->conf_ctx;
|
||||
conf.cycle = cycle;
|
||||
conf.pool = pool;
|
||||
diff --git a/src/os/unix/ngx_process.c b/src/os/unix/ngx_process.c
|
||||
index 12a8c68..874c9bf 100644
|
||||
--- a/src/os/unix/ngx_process.c
|
||||
+++ b/src/os/unix/ngx_process.c
|
||||
@@ -34,6 +34,7 @@ ngx_int_t ngx_process_slot;
|
||||
ngx_socket_t ngx_channel;
|
||||
ngx_int_t ngx_last_process;
|
||||
ngx_process_t ngx_processes[NGX_MAX_PROCESSES];
|
||||
+ngx_proc_exit_pt ngx_proc_exit_top_handler;
|
||||
|
||||
|
||||
ngx_signal_t signals[] = {
|
||||
@@ -83,6 +84,13 @@ ngx_signal_t signals[] = {
|
||||
};
|
||||
|
||||
|
||||
+void
|
||||
+ngx_proc_exit_def_handler(ngx_pid_t pid)
|
||||
+{
|
||||
+ /* do nothing */
|
||||
+}
|
||||
+
|
||||
+
|
||||
ngx_pid_t
|
||||
ngx_spawn_process(ngx_cycle_t *cycle, ngx_spawn_proc_pt proc, void *data,
|
||||
char *name, ngx_int_t respawn)
|
||||
@@ -564,6 +572,7 @@ ngx_process_get_status(void)
|
||||
}
|
||||
|
||||
ngx_unlock_mutexes(pid);
|
||||
+ ngx_proc_exit_top_handler(pid);
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/os/unix/ngx_process.h b/src/os/unix/ngx_process.h
|
||||
index 3986639..0b55d98 100644
|
||||
--- a/src/os/unix/ngx_process.h
|
||||
+++ b/src/os/unix/ngx_process.h
|
||||
@@ -18,6 +18,8 @@ typedef pid_t ngx_pid_t;
|
||||
#define NGX_INVALID_PID -1
|
||||
|
||||
typedef void (*ngx_spawn_proc_pt) (ngx_cycle_t *cycle, void *data);
|
||||
+#define NGX_HAVE_PROC_EXIT 1
|
||||
+typedef void (*ngx_proc_exit_pt)(ngx_pid_t pid);
|
||||
|
||||
typedef struct {
|
||||
ngx_pid_t pid;
|
||||
@@ -66,6 +68,7 @@ ngx_pid_t ngx_spawn_process(ngx_cycle_t *cycle,
|
||||
ngx_pid_t ngx_execute(ngx_cycle_t *cycle, ngx_exec_ctx_t *ctx);
|
||||
ngx_int_t ngx_init_signals(ngx_log_t *log);
|
||||
void ngx_debug_point(void);
|
||||
+void ngx_proc_exit_def_handler(ngx_pid_t pid);
|
||||
|
||||
|
||||
#if (NGX_HAVE_SCHED_YIELD)
|
||||
@@ -85,6 +88,7 @@ extern ngx_socket_t ngx_channel;
|
||||
extern ngx_int_t ngx_process_slot;
|
||||
extern ngx_int_t ngx_last_process;
|
||||
extern ngx_process_t ngx_processes[NGX_MAX_PROCESSES];
|
||||
+extern ngx_proc_exit_pt ngx_proc_exit_top_handler;
|
||||
|
||||
|
||||
#endif /* _NGX_PROCESS_H_INCLUDED_ */
|
Loading…
Reference in a new issue