rule-reload: fix possible hangup with SIGUSR2

In some cases the rule reload could hang. The pending USR2 signals will
be recognized even with the <2 check. Also the SCLogWarning shouldn't be
used in the handler (see Warning about SCLog* API above in the code).
pull/3093/head
Andreas Herz 7 years ago committed by Victor Julien
parent be9ec3958e
commit 77e548ed1c

@ -293,11 +293,8 @@ static void SignalHandlerSigterm(/*@unused@*/ int sig)
*/ */
static void SignalHandlerSigusr2(int sig) static void SignalHandlerSigusr2(int sig)
{ {
if (sigusr2_count < 16) { if (sigusr2_count < 2)
sigusr2_count++; sigusr2_count++;
} else {
SCLogWarning(SC_ERR_LIVE_RULE_SWAP, "Too many USR2 signals pending, ignoring new ones!");
}
} }
/** /**

Loading…
Cancel
Save