summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/syslog.c
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2004-12-24 09:48:44 +0000
committerglebius <glebius@FreeBSD.org>2004-12-24 09:48:44 +0000
commitb98cd781ae577cea9e63f3aed891e23f69ef42b6 (patch)
tree7dd290c8c5cbb075da04f770dabab4dbe040e3a4 /lib/libc/gen/syslog.c
parentf49c00bce2a302d5aa8585e7b5ecf36183a9992e (diff)
downloadFreeBSD-src-b98cd781ae577cea9e63f3aed891e23f69ef42b6.zip
FreeBSD-src-b98cd781ae577cea9e63f3aed891e23f69ef42b6.tar.gz
Restore standard behavior: log to console only when normal logging
failed, not always. PR: bin/75356 Submitted by: Mark Knight <markk knigma org> Pointy hat to: glebius MFC after: 3 days
Diffstat (limited to 'lib/libc/gen/syslog.c')
-rw-r--r--lib/libc/gen/syslog.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libc/gen/syslog.c b/lib/libc/gen/syslog.c
index 93c4146..76a3a5b 100644
--- a/lib/libc/gen/syslog.c
+++ b/lib/libc/gen/syslog.c
@@ -273,11 +273,12 @@ vsyslog(pri, fmt, ap)
do {
usleep(1);
if (send(LogFile, tbuf, cnt, 0) >= 0)
- break;
+ return;
if (status == CONNPRIV)
break;
} while (errno == ENOBUFS);
- }
+ } else
+ return;
/*
* Output the message to the console; try not to block
OpenPOWER on IntegriCloud