summaryrefslogtreecommitdiffstats
path: root/debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'debug.c')
-rw-r--r--debug.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/debug.c b/debug.c
index 74794e7f..5887f5dc 100644
--- a/debug.c
+++ b/debug.c
@@ -988,13 +988,18 @@ static void sigusr2Hdlr(int __attribute__((unused)) signum)
rsRetVal dbgClassInit(void)
{
struct sigaction sigAct;
+ sigset_t sigSet;
(void) pthread_key_create(&keyCallStack, dbgCallStackDestruct); /* MUST be the first action done! */
+
memset(&sigAct, 0, sizeof (sigAct));
sigemptyset(&sigAct.sa_mask);
sigAct.sa_handler = sigusr2Hdlr;
- //sigaction(SIGUSR2, &sigAct, NULL);
- sigaction(SIGUSR1, &sigAct, NULL);
+ sigaction(SIGUSR2, &sigAct, NULL);
+
+ sigemptyset(&sigSet);
+ sigaddset(&sigSet, SIGUSR2);
+ pthread_sigmask(SIG_UNBLOCK, &sigSet, NULL);
pszAltDbgFileName = getenv("RSYSLOG_DEBUGLOG");