]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MEDIUM: mworker: move proc_list gen before proxies startup
authorWilliam Lallemand <wlallemand@haproxy.com>
Fri, 26 Oct 2018 12:47:33 +0000 (14:47 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 28 Oct 2018 12:51:38 +0000 (13:51 +0100)
We need to generate the process list before starting the proxies,
because it will be used to create a proxy in the master

src/haproxy.c

index d5c55e17238239f658134fc04ec1292aecb13e55..e466904322a45448818600ba41d254190291f319 100644 (file)
@@ -852,8 +852,6 @@ static void mworker_loop()
 
        master = 1;
 
-       mworker_env_to_proc_list(); /* get the info of the children in the env */
-
        signal_register_fct(SIGTERM, mworker_catch_sigterm, SIGTERM);
        signal_register_fct(SIGUSR1, mworker_catch_sigterm, SIGUSR1);
        signal_register_fct(SIGINT, mworker_catch_sigterm, SIGINT);
@@ -1723,6 +1721,7 @@ static void init(int argc, char **argv)
 
                        LIST_ADDQ(&proc_list, &tmproc->list);
                }
+               mworker_env_to_proc_list(); /* get the info of the children in the env */
        }
 
        pattern_finalize_config();