]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: mworker: report status, if daemonized master fails
authorValentine Krasnobaeva <vkrasnobaeva@haproxy.com>
Mon, 9 Dec 2024 17:56:01 +0000 (18:56 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 9 Dec 2024 20:32:49 +0000 (21:32 +0100)
commit97aaf7671654ceba16727f8375104064538c40e6
tree4e886ffc613938ea37a04bef44da1bb2b5940b00
parent663d75e7a00a9c50185cca322cbc64de934b6631
BUG/MEDIUM: mworker: report status, if daemonized master fails

As daemonization fork happens now very early and before the master-worker
fork, if master or worker processes fail during the initialization, some
critical errors can't be reported to stdout. The launching (parent) process in
such cases exits with 0. This makes an impression, that master and his worker
have successfully started at background, which really complicates the
operations.

In the previous commit a pipe was added to make daemonized child communicate
with his parent. Let's add the same logic to master-worker mode. Up to
receiving the READY message from the worker, master will "forward" it via the
pipe to the launching process. Launching process can obtain master's exit
status, if the master fails to start and nothing has been written in the pipe.

This fix should be backported only in 3.1.
src/cli.c
src/mworker.c