mirror of
				https://git.haproxy.org/git/haproxy.git/
				synced 2025-10-31 00:21:00 +01:00 
			
		
		
		
	After master-worker mode refactoring, global.pidfile is only used in handle_pidfile(), which opens the provided file and writes the PID into it. So, it's more appropriate to perform the close(pidfd) and ha_free(&global.pidfile) also in this function. This commit prepares the fix of the pidfile creation, as it's created now very early, when we are not sure, that process has successfully started. In master-worker mode handle_pidfile() can be called in the master process context. So, let's make it accessible from other compilation units via global.h. This should be backported only in 3.1.