From e2ffeb19f9c2962fd711e28d50ce0d51ae3bbc45 Mon Sep 17 00:00:00 2001 From: varmojfekoj Date: Thu, 15 Jan 2009 12:59:21 +0100 Subject: bugfix: the string "Do Die" was accidently emited upon exit in non-debug mode Signed-off-by: Rainer Gerhards --- tools/syslogd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tools/syslogd.c') 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; -- cgit v1.2.3