diff options
| author | David Malone <dwmalone@FreeBSD.org> | 2003-11-16 21:51:06 +0000 |
|---|---|---|
| committer | David Malone <dwmalone@FreeBSD.org> | 2003-11-16 21:51:06 +0000 |
| commit | de4aac0deb603a468319d07cc9f701578d72a536 (patch) | |
| tree | 04b8138ea35be91b01435250e726b7c8a8f77cce /usr.sbin/syslogd | |
| parent | 3c453e20f9d94c17cf78d5ed994955a23059e399 (diff) | |
Notes
Diffstat (limited to 'usr.sbin/syslogd')
| -rw-r--r-- | usr.sbin/syslogd/syslogd.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index f2d08743436c..c47dfa9e91de 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -1338,7 +1338,12 @@ static void logerror(const char *type) { char buf[512]; + static int recursed = 0; + /* If there's an error while trying to log an error, give up. */ + if (recursed) + return; + recursed++; if (errno) (void)snprintf(buf, sizeof buf, "syslogd: %s: %s", type, strerror(errno)); @@ -1347,6 +1352,7 @@ logerror(const char *type) errno = 0; dprintf("%s\n", buf); logmsg(LOG_SYSLOG|LOG_ERR, buf, LocalHostName, ADDDATE); + recursed--; } static void |
