]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: startup: fix error path for master, if can't open pidfile
authorValentine Krasnobaeva <vkrasnobaeva@haproxy.com>
Tue, 3 Dec 2024 20:33:55 +0000 (21:33 +0100)
committerWilliam Lallemand <wlallemand@haproxy.com>
Fri, 6 Dec 2024 11:00:22 +0000 (12:00 +0100)
commitcd0b58e23e12f12369bc1a6e65c6a97409ee8cd6
tree02656e6e7c67de521ac3ba1ec910ae599c4ec97a
parentee111d2004ca653387515f340c504d18b71191c3
BUG/MINOR: startup: fix error path for master, if can't open pidfile

If master process can't open a pidfile, there is no sense to send SIGTTIN to
oldpids, as it will exit. So, old workers will terminate as well. It's better
to send the last alert to the log about unrecoverable error, because master is
already in its polling loop.

For the standalone mode we should keep the previous logic in this case: send
SIGTTIN to old process and unbind listeners for the new one. So, it's better
to put this error path in main(), as it's done when other configuration settings
can't be applied.

This patch should be backported only in 3.1.
include/haproxy/global.h
src/cli.c
src/haproxy.c