summaryrefslogtreecommitdiffstats
path: root/tools/syslogd.c
diff options
context:
space:
mode:
authorTomas Heinrich <theinric@redhat.com>2012-05-29 11:21:50 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2012-05-29 11:21:50 +0200
commita4980cbde24b48c5540435d27d01651d5ca46d03 (patch)
treef369293f701bed7f98829e1ead9219ddd1e843e9 /tools/syslogd.c
parent131e581845678a30e3dea0e499e78acc429cd5fa (diff)
downloadrsyslog-a4980cbde24b48c5540435d27d01651d5ca46d03.tar.gz
rsyslog-a4980cbde24b48c5540435d27d01651d5ca46d03.tar.xz
rsyslog-a4980cbde24b48c5540435d27d01651d5ca46d03.zip
bugfix: if debug message could end up in log file when forking
if rsyslog was set to auto-background (thus fork, the default) and debug mode to stdout was enabled, debug messages ended up in the first log file opened. Currently, stdout logging is completely disabled in forking mode (but writing to the debug log file is still possible). This is a change in behaviour, which is under review. If it causes problems to you, please let us know. Signed-off-by: Rainer Gerhards <rgerhards@adiscon.com>
Diffstat (limited to 'tools/syslogd.c')
-rw-r--r--tools/syslogd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/syslogd.c b/tools/syslogd.c
index 98f06627..f3f27598 100644
--- a/tools/syslogd.c
+++ b/tools/syslogd.c
@@ -2514,6 +2514,9 @@ doGlblProcessInit(void)
sigAct.sa_handler = doexit;
sigaction(SIGTERM, &sigAct, NULL);
+ /* stop writing debug messages to stdout (if debugging is on) */
+ stddbg = -1;
+
if (fork()) {
/* Parent process
*/