mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-15 21:59:41 -04:00
MINOR: systemd: ensure a reload doesn't mask a stop
If a SIGHUP/SIGUSR2 is sent immediately after a SIGTERM/SIGINT and before wait() is notified, it will mask it since there's no queue, only a copy of the last received signal. Let's add a special check before overwriting the signal so that SIGTERM/SIGINT are not masked.
This commit is contained in:
parent
6c2f7955e7
commit
a3aa9e6840
1 changed files with 2 additions and 1 deletions
|
|
@ -123,7 +123,8 @@ static int read_pids(char ***pid_strv)
|
|||
|
||||
static void signal_handler(int signum)
|
||||
{
|
||||
caught_signal = signum;
|
||||
if (caught_signal != SIGINT && caught_signal != SIGTERM)
|
||||
caught_signal = signum;
|
||||
}
|
||||
|
||||
/* handles SIGUSR2 and SIGHUP only */
|
||||
|
|
|
|||
Loading…
Reference in a new issue