BUG/MEDIUM: mworker: fix the reload with an -- option
authorWilliam Lallemand <wlallemand@haproxy.com>
Fri, 5 Jun 2020 12:08:41 +0000 (14:08 +0200)
committerWilliam Lallemand <wlallemand@haproxy.org>
Fri, 5 Jun 2020 17:08:17 +0000 (19:08 +0200)
commit29e710624583d71e7eeae63a6ea7734006a1ea57
tree29f7c100c98f39b15da0f93f548d059101e6d8e9
parenta1de71f2577ee9cf071eefd36e1d445deba29388
BUG/MEDIUM: mworker: fix the reload with an -- option

When HAProxy is started with a '--' option, all following parameters are
considered configuration files. You can't add new options after a '--'.

The current reload system of the master-worker adds extra options at the
end of the arguments list. Which is a problem if HAProxy was started wih
'--'.

This patch fixes the issue by copying the new option at the beginning of
the arguments list instead of the end.

This patch must be backported as far as 1.8.

(cherry picked from commit 0041741ef7253fcad2fc98f0b2a9968fb4af3574)
[wla: context edit]
Signed-off-by: William Lallemand <wlallemand@haproxy.org>
src/haproxy.c