mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-03-05 02:49:01 +00:00
BUG/MINOR: mworker: mworker_kill should apply on every children
Commit 3f12887
("MINOR: mworker: don't use children variable anymore")
introduced a regression.
The previous behavior was to send a signal to every children, whether or
not they are former children. Instead of this, we only send a signal to
the current children, so we don't try to kill -INT or -TERM all
processes during a reload.
No backport needed.
This commit is contained in:
parent
85d0424b20
commit
32b6901550
@ -54,7 +54,7 @@ static void mworker_kill(int sig)
|
||||
|
||||
list_for_each_entry(child, &proc_list, list) {
|
||||
/* careful there, we must be sure that the pid > 0, we don't want to emit a kill -1 */
|
||||
if ((child->options & (PROC_O_TYPE_WORKER|PROC_O_TYPE_PROG)) && (child->reloads == 0) && (child->pid > 0))
|
||||
if ((child->options & (PROC_O_TYPE_WORKER|PROC_O_TYPE_PROG)) && (child->pid > 0))
|
||||
kill(child->pid, sig);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user