For the master process we always need to create a MASTER proxy, even if
master cli settings were not provided via command line, because now we bind a
listener in the master process context at ipc_fd[0]. So, MASTER proxy should be
already allocated at this moment.
*/
global.nbtgroups = 1;
global.nbthread = 1;
- /* master CLI */
+
+ /* creates MASTER proxy and attaches server to child->ipc_fd[0] */
+ if (mworker_cli_proxy_create() < 0) {
+ ha_alert("Can't create the master's CLI.\n");
+ exit(EXIT_FAILURE);
+ }
+
+ /* creates reload sockpair and listeners for master CLI (-S) */
mworker_create_master_cli();
}
}
if (!LIST_ISEMPTY(&mworker_cli_conf)) {
char *path = NULL;
- if (mworker_cli_proxy_create() < 0) {
- ha_alert("Can't create the master's CLI.\n");
- exit(EXIT_FAILURE);
- }
-
list_for_each_entry_safe(c, it, &mworker_cli_conf, list) {
if (mworker_cli_master_proxy_new_listener(c->s) == NULL) {
ha_alert("Can't create the master's CLI.\n");