void mworker_accept_wrapper(int fd);
void mworker_reload(int hardreload);
+void on_new_child_failure(void);
/* to be used with warned and WARN_* */
static inline int already_warned(unsigned int warning)
/*
* Reexec the process in failure mode, instead of exiting
*/
-void reexec_on_failure()
+void on_new_child_failure()
{
struct mworker_proc *child;
- if (!atexit_flag)
- return;
-
- /* get the info of the children in the env */
- if (mworker_env_to_proc_list() < 0) {
- exit(EXIT_FAILURE);
- }
-
/* increment the number of failed reloads */
list_for_each_entry(child, &proc_list, list) {
child->failedreloads++;
usermsgs_clr(NULL);
setenv("HAPROXY_LOAD_SUCCESS", "0", 1);
- ha_warning("Loading failure!\n");
+ ha_warning("Failed to load worker!\n");
#if defined(USE_SYSTEMD)
/* the sd_notify API is not able to send a reload failure signal. So
* the READY=1 signal still need to be sent */
if (global.tune.options & GTUNE_USE_SYSTEMD)
sd_notify(0, "READY=1\nSTATUS=Reload failed!\n");
#endif
-
- mworker_reexec(0);
}
/*