bugfix: destroy `pool` before the daemon process exits.

pull/401/head
Yuansheng 7 years ago
parent a5e7a17cdf
commit da4e4bf8da

@ -0,0 +1,12 @@
diff --git a/src/os/unix/ngx_daemon.c b/src/os/unix/ngx_daemon.c
index ab672110..4bf09e77 100644
--- a/src/os/unix/ngx_daemon.c
+++ b/src/os/unix/ngx_daemon.c
@@ -23,6 +23,7 @@ ngx_daemon(ngx_log_t *log)
break;
default:
+ ngx_destroy_pool(ngx_cycle->pool);
exit(0);
}

@ -65,6 +65,11 @@ if [ "$answer" = "Y" ]; then
echo "$info_txt applying the resolver_conf_parsing patch for nginx"
patch -p1 < $root/patches/nginx-$main_ver-resolver_conf_parsing.patch || exit 1
echo
echo "$info_txt applying the daemon-destroy-pool patch for nginx"
patch -p1 < $root/patches/nginx-$main_ver-daemon-destroy-pool.patch || exit 1
echo
fi
answer=`$root/util/ver-ge "$main_ver" 1.5.12`

Loading…
Cancel
Save