summaryrefslogtreecommitdiffstats
path: root/debug.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-02-18 10:41:07 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-02-18 10:41:07 +0000
commita914e3164e5c9522b6ac9a39327ed46628d3e045 (patch)
tree54c679bbfa81a831a68563d979961f4db12db319 /debug.c
parent14df0c7c57ae3f41c56c73c1d17e40783758ec40 (diff)
downloadrsyslog-a914e3164e5c9522b6ac9a39327ed46628d3e045.tar.gz
rsyslog-a914e3164e5c9522b6ac9a39327ed46628d3e045.tar.xz
rsyslog-a914e3164e5c9522b6ac9a39327ed46628d3e045.zip
- removed no longer necessary signal from threads.c
- changed debug output request signal to SIGUSR2 (as originally intented), restored SIGUSR1 semantics
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");