From: bert hubert Date: Fri, 21 Mar 2014 20:40:02 +0000 (+0100) Subject: make SIGUSR2 a toggle instead of 'on for now and forever'. USR2 is undocumented btw. X-Git-Tag: rec-3.6.0-rc1~115^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f1f34cc200bf61617ce9cd19378105f6497ae6b7;p=thirdparty%2Fpdns.git make SIGUSR2 a toggle instead of 'on for now and forever'. USR2 is undocumented btw. --- diff --git a/pdns/pdns_recursor.cc b/pdns/pdns_recursor.cc index 67d0cbd0cc..e275c3d0e7 100644 --- a/pdns/pdns_recursor.cc +++ b/pdns/pdns_recursor.cc @@ -1103,10 +1103,9 @@ void usr1Handler(int) void usr2Handler(int) { - SyncRes::setDefaultLogMode(SyncRes::Log); - g_quiet=false; - ::arg().set("quiet")="no"; - + g_quiet= !g_quiet; + SyncRes::setDefaultLogMode(g_quiet ? SyncRes::LogNone : SyncRes::Log); + ::arg().set("quiet")=g_quiet ? "" : "no"; } void doStats(void)