From: Valentine Krasnobaeva Date: Fri, 22 Nov 2024 21:41:46 +0000 (+0100) Subject: MINOR: startup: rename on_new_child_failure to mworker_on_new_child_failure X-Git-Tag: v3.1.0~21 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=321c021a83fcff6cd829d4fa1f462bf3464559ba;p=thirdparty%2Fhaproxy.git MINOR: startup: rename on_new_child_failure to mworker_on_new_child_failure This patch prepares the moving of on_new_child_failure definition into mworker.c. So, let's rename it accordingly and let's also update its description. --- diff --git a/include/haproxy/global.h b/include/haproxy/global.h index eb1fc6ec24..d3cc12221a 100644 --- a/include/haproxy/global.h +++ b/include/haproxy/global.h @@ -68,7 +68,7 @@ void display_version(); void mworker_accept_wrapper(int fd); void mworker_reload(int hardreload); -void on_new_child_failure(void); +void mworker_on_new_child_failure(void); /* to be used with warned and WARN_* */ static inline int already_warned(unsigned int warning) diff --git a/src/haproxy.c b/src/haproxy.c index a3a36bbb1a..4b880b81cd 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -915,9 +915,10 @@ static void mworker_loop() } /* - * Reexec the process in failure mode, instead of exiting + * Performs some routines for the worker process, which has failed the reload, + * updates the global load_status. */ -void on_new_child_failure() +void mworker_on_new_child_failure() { struct mworker_proc *child; diff --git a/src/mworker.c b/src/mworker.c index be453990a2..ffd4840574 100644 --- a/src/mworker.c +++ b/src/mworker.c @@ -356,7 +356,7 @@ restart_wait: /* We didn't find the PID in the list, that shouldn't happen but we can emit a warning */ ha_warning("Process %d exited with code %d (%s)\n", exitpid, status, (status >= 128) ? strsignal(status - 128) : "Exit"); } else if (child->options & PROC_O_INIT) { - on_new_child_failure(); + mworker_on_new_child_failure(); /* Detach all listeners */ for (curproxy = proxies_list; curproxy; curproxy = curproxy->next) {