rsyslog/rsyslog-3.21.9-dodie.patch

18 lines
656 B
Diff
Raw Normal View History

diff -up rsyslog-3.21.9/tools/syslogd.c.dodie rsyslog-3.21.9/tools/syslogd.c
--- rsyslog-3.21.9/tools/syslogd.c.dodie 2009-01-05 17:20:33.000000000 +0100
+++ rsyslog-3.21.9/tools/syslogd.c 2009-01-05 17:25:19.000000000 +0100
@@ -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;