MINOR: mworker: replace ha_alert by ha_warning when exiting successfuly
Since commit bb86986
("MINOR: init: report the haproxy version and
executable path once on errors") the master-worker displays its version
and path upon a successful exits of a current worker. Which is kind of
confusing upon a clean exits.
This is due to the fact that that commit displays this upon a ha_alert()
which was used during the exit of the process.
Replace the ha_alert() by an ha_warning() if the process exit correctly
and was supposed to.
It still displays the message upon a SIGINT since the workers are
catching the signal.
This commit is contained in:
parent
8d38f0affd
commit
a655ba4a94
|
@ -290,8 +290,12 @@ void mworker_catch_sigchld(struct sig_handler *sh)
|
||||||
} else {
|
} else {
|
||||||
/* check if exited child is a current child */
|
/* check if exited child is a current child */
|
||||||
if (!(child->options & PROC_O_LEAVING)) {
|
if (!(child->options & PROC_O_LEAVING)) {
|
||||||
if (child->options & PROC_O_TYPE_WORKER)
|
if (child->options & PROC_O_TYPE_WORKER) {
|
||||||
ha_alert("Current worker #%d (%d) exited with code %d (%s)\n", child->relative_pid, exitpid, status, (status >= 128) ? strsignal(status - 128) : "Exit");
|
if (status < 128)
|
||||||
|
ha_warning("Current worker #%d (%d) exited with code %d (%s)\n", child->relative_pid, exitpid, status, "Exit");
|
||||||
|
else
|
||||||
|
ha_alert("Current worker #%d (%d) exited with code %d (%s)\n", child->relative_pid, exitpid, status, strsignal(status - 128));
|
||||||
|
}
|
||||||
else if (child->options & PROC_O_TYPE_PROG)
|
else if (child->options & PROC_O_TYPE_PROG)
|
||||||
ha_alert("Current program '%s' (%d) exited with code %d (%s)\n", child->id, exitpid, status, (status >= 128) ? strsignal(status - 128) : "Exit");
|
ha_alert("Current program '%s' (%d) exited with code %d (%s)\n", child->id, exitpid, status, (status >= 128) ? strsignal(status - 128) : "Exit");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue