summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvarmojfekoj <theinric@redhat.com>2009-01-15 12:59:21 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2009-01-15 12:59:21 +0100
commite2ffeb19f9c2962fd711e28d50ce0d51ae3bbc45 (patch)
tree6f2d19abd88c410e3eda43799de46aa3cccd3bb5
parent44e35af7a851ce920d4db312acd9a2cdf516a81c (diff)
downloadrsyslog-e2ffeb19f9c2962fd711e28d50ce0d51ae3bbc45.tar.gz
rsyslog-e2ffeb19f9c2962fd711e28d50ce0d51ae3bbc45.tar.xz
rsyslog-e2ffeb19f9c2962fd711e28d50ce0d51ae3bbc45.zip
bugfix: the string "Do Die" was accidently emited upon exit in non-debug mode
Signed-off-by: Rainer Gerhards <rgerhards@adiscon.com>
-rw-r--r--ChangeLog2
-rw-r--r--tools/syslogd.c6
2 files changed, 6 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index abdeb30a..8f48d6e0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
---------------------------------------------------------------------------
Version 3.21.10 [BETA] (rgerhards), 2008-12-??
+- the string "Do Die" was accidently emited upon exit in non-debug mode
+ This has now been corrected. Thanks to varmojfekoj for the patch.
- some legacy options were not correctly processed.
Thanks to varmojfekoj for the patch.
- doc bugfix: v3-compatiblity document had typo in config directive
diff --git a/tools/syslogd.c b/tools/syslogd.c
index fd34c9f5..bc1f71d3 100644
--- a/tools/syslogd.c
+++ b/tools/syslogd.c
@@ -1877,9 +1877,11 @@ static void doDie(int sig)
# define MSG1 "DoDie called.\n"
# define MSG2 "DoDie called 5 times - unconditional exit\n"
static int iRetries = 0; /* debug aid */
- write(1, MSG1, sizeof(MSG1));
+ if(Debug || NoFork)
+ write(1, MSG1, sizeof(MSG1) - 1);
if(iRetries++ == 4) {
- write(1, MSG2, sizeof(MSG2));
+ if(Debug || NoFork)
+ write(1, MSG2, sizeof(MSG2) - 1);
abort();
}
bFinished = sig;