﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	uname	nginx_version
1632	Pool cleanups are not called in the daemonization	spacewanderlzx@…		"When we run our testsuites with LeakSanitizer, we noticed lots of leak reports.

After some investigations, we found that the pool cleanups registered with ngx_cycle->pool are not invoked when the parent exits during the daemonization, which causes the leak reports.

I am not sure whether it is a bug, or should we change the testsuite to run Nginx in ""daemon off"" mode.
Anyway, it could be 'fixed' via a simple change:

{{{
--- 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);
     }
}}}

Note that this change doesn't cover signaller mode and error handling path."	defect	closed	minor		nginx-core	1.15.x	wontfix			Linux machine_name 4.13.0-36-generic #40-Ubuntu SMP Fri Feb 16 20:07:48 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux	nginx version: nginx/1.13.6
