]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: startup: don't daemonize if started with -c
authorValentine Krasnobaeva <vkrasnobaeva@haproxy.com>
Mon, 9 Dec 2024 11:00:35 +0000 (12:00 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 9 Dec 2024 20:32:36 +0000 (21:32 +0100)
commit5f94e98d8958ff0003bfbb736427070d16270d6e
tree5bfc918fa5609d77875274c4205d08d3afd2771f
parent5d1b30d6b84bc544b8eda846a632f2b55a19bb51
BUG/MEDIUM: startup: don't daemonize if started with -c

Due to master-worker refactoring, daemonization fork happens now very early,
before parsing and verifying the configuration. For the moment there is no
any specific syntax, which needs for the daemon mode to be really applied in
order to perform the tests.

So, it's better not to do the daemonization fork, if 'daemon' keyword is
presented in the config (or -D option), when we started with -c (MODE_CHECK).
Like this, during the config verification, the process will always stay in
foreground and all warning or errors will be delivered to the stdout.

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