MEDIUM: initcall: use initcalls for a few initialization functions
signal_init(), init_log(), init_stream(), and init_task() all used to
only preset some values and lists. This needs to be done very early to
provide a reliable interface to all other users. The calls used to be
explicit in haproxy.c:init(). Now they're placed in initcalls at the
STG_PREPARE stage. The functions are not exported anymore.
diff --git a/src/haproxy.c b/src/haproxy.c
index 96715ee..6567b43 100644
--- a/src/haproxy.c
+++ b/src/haproxy.c
@@ -1426,12 +1426,9 @@
srandom(now_ms - getpid());
- init_log();
- signal_init();
if (init_acl() != 0)
exit(1);
- init_task();
- init_stream();
+
/* warning, we init buffers later */
if (!init_http(&err_msg)) {
ha_alert("%s. Aborting.\n", err_msg);