BUG/MINOR: mworker: does not add the -sf in wait mode
authorWilliam Lallemand <wlallemand@haproxy.org>
Wed, 24 Nov 2021 23:49:19 +0000 (00:49 +0100)
committerWilliam Lallemand <wlallemand@haproxy.org>
Fri, 11 Feb 2022 15:45:50 +0000 (16:45 +0100)
commit84b5fbdc934c4a26d8b87bc75641b24debb93988
tree85a7a42d91bf7d650d803e8e3f30c34779b7a080
parentb8df64a85120195f40e0f55b9db54c95b72bbdcc
BUG/MINOR: mworker: does not add the -sf in wait mode

Since the wait mode is automatically executed after charging the
configuration, -sf was shown in argv[] with the previous PID, which is
normal, but also the current one. This is only a visual problem when
listing the processes, because -sf does not do anything in wait mode.

Fix the issue by removing the whole "-sf" part in wait mode, but the
executed command can be seen in the argv[] of the latest worker forked.

Must be backported in 2.5.

(cherry picked from commit befab9ee4aa2dfe0405d7f1416991175be2fbe67)
[wla: in 2.5 we still need the -x in wait mode, because we don't know
anymore the stats socket in the configuration once we reexec in waitmode]
Signed-off-by: William Lallemand <wlallemand@haproxy.org>
src/haproxy.c