]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MEDIUM: init: handle arguments earlier
authorWilly Tarreau <w@1wt.eu>
Wed, 23 Feb 2022 16:25:00 +0000 (17:25 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 23 Feb 2022 16:28:41 +0000 (17:28 +0100)
The argument parser runs too late, we'll soon need it before creating
pools, hence just after init_early(). No visible change is expected but
this part is sensitive enough to be placed into its own commit for easier
bisection later if needed.

src/haproxy.c

index 4cb8fe1cd4f11fe9a7f86d78ed790ea80d8332c4..b62f305345d07b004a951d5b9b8cf814204fc79c 100644 (file)
@@ -2942,13 +2942,13 @@ int main(int argc, char **argv)
        /* now's time to initialize early boot variables */
        init_early(argc, argv);
 
+       /* handles argument parsing */
+       init_args(argc, argv);
+
        RUN_INITCALLS(STG_ALLOC);
        RUN_INITCALLS(STG_POOL);
        RUN_INITCALLS(STG_INIT);
 
-       /* handles argument parsing */
-       init_args(argc, argv);
-
        /* this is the late init where the config is parsed */
        init(argc, argv);