]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: init: allow the redefinition of argv[] parsing function
authorFrederic Lecaille <flecaille@haproxy.com>
Wed, 11 Feb 2026 10:16:39 +0000 (11:16 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 19 Feb 2026 13:46:49 +0000 (14:46 +0100)
commit1dc20a630ae9a01c5f9ce94739befd32a792e06e
tree005079236cc69c33c21765c7a48f61e46c2f2779
parent6013f4baeb66c15d0c643082ff7850d9f7d2b1c7
MEDIUM: init: allow the redefinition of argv[] parsing function

This patches allows the argv[] parsing function to be redefined from
others C modules. This is done extracting the function which really
parse the argv[] array to implement haproxy_init_args(). This function
is declared as a weak symbol which may be overloaded by others C module.

Same thing for copy_argv() which checks/cleanup/modifies the argv array.
One may want this function to be redefined. This is the case when other
C modules do not handle the same command line option. Copying such
argv[] would lead to conflicts with the original haproxy argv[] during
the copy.
src/haproxy.c