diff options
author | Christian S.J. Peron <csjp@FreeBSD.org> | 2006-03-30 21:04:52 +0000 |
---|---|---|
committer | Christian S.J. Peron <csjp@FreeBSD.org> | 2006-03-30 21:04:52 +0000 |
commit | ae4f0fc3a965c40700862eb296334d155556c921 (patch) | |
tree | 64b82c178ccbe7ec854214d0b2c0ee0556b902ff | |
parent | cd70100e5d6130eac92a72071bc273052351c91c (diff) |
Notes
-rw-r--r-- | usr.sbin/syslogd/syslogd.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index a41b22cdd04de..23e30f8acbfa9 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -1227,11 +1227,18 @@ fprintlog(struct filed *f, int flags, const char *msg) v->iov_base = lf; v->iov_len = 1; if (writev(f->f_file, iov, 7) < 0) { - int e = errno; - (void)close(f->f_file); - f->f_type = F_UNUSED; - errno = e; - logerror(f->f_un.f_fname); + /* + * If writev(2) fails for potentially transient errors + * like the * filesystem being full, ignore it. + * Otherwise remove * this logfile from the list. + */ + if (errno != ENOSPC) { + int e = errno; + (void)close(f->f_file); + f->f_type = F_UNUSED; + errno = e; + logerror(f->f_un.f_fname); + } } else if ((flags & SYNC_FILE) && (f->f_flags & FFLAG_SYNC)) { f->f_flags |= FFLAG_NEEDSYNC; needdofsync = 1; |