diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-09-26 16:22:15 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-09-26 16:22:15 +0200 |
commit | 96f312f94f127b7bc9a39e5822afdf28a5b2286c (patch) | |
tree | de6601ef23c8a438ccf1138a3d050a1d2ba28569 /tools | |
parent | 5b43ffdf1bc099a9e9b0696ab939f5eb6d9bef2a (diff) | |
parent | b8e82d59b7aba7da65e4244a29b92274aa50d08d (diff) | |
download | rsyslog-96f312f94f127b7bc9a39e5822afdf28a5b2286c.tar.gz rsyslog-96f312f94f127b7bc9a39e5822afdf28a5b2286c.tar.xz rsyslog-96f312f94f127b7bc9a39e5822afdf28a5b2286c.zip |
Merge branch 'helgrind' into perf
Conflicts:
runtime/debug.c
Diffstat (limited to 'tools')
-rw-r--r-- | tools/syslogd.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/syslogd.c b/tools/syslogd.c index e95d02c2..0f6a4bd1 100644 --- a/tools/syslogd.c +++ b/tools/syslogd.c @@ -1871,16 +1871,22 @@ void legacyOptsParseTCP(char ch, char *arg) * a minimal delay, but it is much cleaner than the approach of doing everything * inside the signal handler. * rgerhards, 2005-10-26 + * Note: we do not call dbgprintf() as this may cause us to block in case something + * with the threading is wrong. */ 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 */ - printf("DoDie called.\n"); + write(1, MSG1, sizeof(MSG1)); if(iRetries++ == 4) { - printf("DoDie called 5 times - unconditional exit\n"); + write(1, MSG2, sizeof(MSG2)); abort(); } bFinished = sig; +# undef MSG1 +# undef MSG2 } |