summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2017-11-24 23:11:43 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2017-11-24 23:11:43 +0000
commit2fa29d30578b1bed077e540a399b83ff3ca7d2ce (patch)
treef27770e7bf23b68bee4159483c8f6ac1a7a2effe /usr.sbin
parentf42512db36ffcaca87fe5acd38eb7f241fda918d (diff)
Revert my change to ignore EIO errors when writing to log files.
Syslogd continued logging messages to a file that had an EIO error. This could slow down the whole system. File system errors may cause huge delays at every access. This prevented debugging the issue. Now syslogd will log a warning and shut down logging to this file until restart or SIGHUP. OK deraadt@ espie@ millert@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/syslogd/syslogd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c
index 373188e2734..3323a5523d2 100644
--- a/usr.sbin/syslogd/syslogd.c
+++ b/usr.sbin/syslogd/syslogd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: syslogd.c,v 1.253 2017/10/23 17:16:35 bluhm Exp $ */
+/* $OpenBSD: syslogd.c,v 1.254 2017/11/24 23:11:42 bluhm Exp $ */
/*
* Copyright (c) 2014-2017 Alexander Bluhm <bluhm@genua.de>
@@ -2061,7 +2061,7 @@ fprintlog(struct filed *f, int flags, char *msg)
int e = errno;
/* allow to recover from file system full */
- if ((e == EIO || e == ENOSPC) && f->f_type == F_FILE) {
+ if (e == ENOSPC && f->f_type == F_FILE) {
if (f->f_dropped++ == 0) {
f->f_type = F_UNUSED;
errno = e;