mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 07:07:04 +02:00
MINOR: mworker: report explicitly when worker exits due to max reloads
It's convienient for testing and for usage to produce different warning messages, when the former worker exits due to max reloads exceeded, and when it was terminated by the master.
This commit is contained in:
parent
4c8303a59e
commit
d11dc11e5a
@ -417,7 +417,10 @@ void mworker_catch_sigchld(struct sig_handler *sh)
|
||||
exitcode = status;
|
||||
} else {
|
||||
if (child->options & PROC_O_TYPE_WORKER) {
|
||||
ha_warning("Former worker (%d) exited with code %d (%s)\n", exitpid, status, (status >= 128) ? strsignal(status - 128) : "Exit");
|
||||
if (child->reloads > max_reloads)
|
||||
ha_warning("Former worker (%d) exited with code %d (%s), as it exceeds max reloads (%d)\n", exitpid, status, (status >= 128) ? strsignal(status - 128) : "Exit", max_reloads);
|
||||
else
|
||||
ha_warning("Former worker (%d) exited with code %d (%s)\n", exitpid, status, (status >= 128) ? strsignal(status - 128) : "Exit");
|
||||
/* Delete fd from poller fdtab, which will close it */
|
||||
fd_delete(child->ipc_fd[0]);
|
||||
delete_oldpid(exitpid);
|
||||
|
Loading…
Reference in New Issue
Block a user