diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-02-18 10:41:07 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-02-18 10:41:07 +0000 |
commit | a914e3164e5c9522b6ac9a39327ed46628d3e045 (patch) | |
tree | 54c679bbfa81a831a68563d979961f4db12db319 /syslogd.c | |
parent | 14df0c7c57ae3f41c56c73c1d17e40783758ec40 (diff) | |
download | rsyslog-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 'syslogd.c')
-rw-r--r-- | syslogd.c | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -2264,8 +2264,13 @@ static void debug_switch() { struct sigaction sigAct; - dbgprintf("Switching debugging_on to %s\n", (debugging_on == 0) ? "true" : "false"); - debugging_on = (debugging_on == 0) ? 1 : 0; + if(debugging_on == 0) { + debugging_on = 1; + dbgprintf("Switching debugging_on to true\n"); + } else { + dbgprintf("Switching debugging_on to false\n"); + debugging_on = 0; + } memset(&sigAct, 0, sizeof (sigAct)); sigemptyset(&sigAct.sa_mask); @@ -4768,8 +4773,8 @@ int realMain(int argc, char **argv) sigAct.sa_handler = sigsegvHdlr; sigaction(SIGSEGV, &sigAct, NULL); -sigAct.sa_handler = sigsegvHdlr; -sigaction(SIGABRT, &sigAct, NULL); + sigAct.sa_handler = sigsegvHdlr; + sigaction(SIGABRT, &sigAct, NULL); sigAct.sa_handler = doDie; sigaction(SIGTERM, &sigAct, NULL); sigAct.sa_handler = Debug ? doDie : SIG_IGN; @@ -4778,8 +4783,7 @@ sigaction(SIGABRT, &sigAct, NULL); sigAct.sa_handler = reapchild; sigaction(SIGCHLD, &sigAct, NULL); sigAct.sa_handler = Debug ? debug_switch : SIG_IGN; - /* TODO: use signal 2 */ - /*sigaction(SIGUSR1, &sigAct, NULL);*/ + sigaction(SIGUSR1, &sigAct, NULL); sigAct.sa_handler = SIG_IGN; sigaction(SIGPIPE, &sigAct, NULL); sigaction(SIGXFSZ, &sigAct, NULL); /* do not abort if 2gig file limit is hit */ |