From: Andreas Herz Date: Wed, 13 Dec 2017 23:59:30 +0000 (+0100) Subject: rule-reload: fix possible hangup with SIGUSR2 X-Git-Tag: suricata-4.0.4~47 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=61403bfcc972befcf18f5b1e2816e11db8fcc214;p=thirdparty%2Fsuricata.git 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). --- diff --git a/src/suricata.c b/src/suricata.c index 291eb13ffa..9bf78dde53 100644 --- a/src/suricata.c +++ b/src/suricata.c @@ -285,11 +285,8 @@ static void SignalHandlerSigterm(/*@unused@*/ int sig) */ static void SignalHandlerSigusr2(int sig) { - if (sigusr2_count < 16) { + if (sigusr2_count < 2) sigusr2_count++; - } else { - SCLogWarning(SC_ERR_LIVE_RULE_SWAP, "Too many USR2 signals pending, ignoring new ones!"); - } } /**