add comment from r2716 commit message
diff --git a/src/http/modules/perl/ngx_http_perl_module.c b/src/http/modules/perl/ngx_http_perl_module.c
index eb6407e..9cdd175 100644
--- a/src/http/modules/perl/ngx_http_perl_module.c
+++ b/src/http/modules/perl/ngx_http_perl_module.c
@@ -1063,9 +1063,15 @@
{
#if (NGX_HAVE_PERL_MULTIPLICITY)
+ /*
+ * the master exit hook is run before global pool cleanup,
+ * therefore just set flag here
+ */
+
ngx_perl_term = 1;
#else
+
if (nginx_stash) {
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, cycle->log, 0, "perl term");