From 8ead571ba130bd93d6c190b32033a5153bc29435 Mon Sep 17 00:00:00 2001 From: Joey Schulze Date: Thu, 24 May 2007 13:28:18 +0000 Subject: [PATCH] When writing log files ignore errors caused by filled up disks so that the log continues to be written as soon as space becomes available again. --- syslogd.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/syslogd.c b/syslogd.c index 72df0db..5853c21 100644 --- a/syslogd.c +++ b/syslogd.c @@ -480,6 +480,10 @@ static char sccsid[] = "@(#)syslogd.c 5.27 (Berkeley) 10/10/88"; * restart code, so that subsequent SIGHUPs are able to set it * again and cause a new restart. This fixes a race condition * when somebody sends tons of HUP signals. + * Thu May 24 15:24:49 CEST 2007: Martin Schulze + * Ignore errors caused by filled up disks so that the log + * continues to be written as soon as space becomes available + * again. */ @@ -1907,6 +1911,12 @@ void fprintlog(f, from, flags, msg) if (f->f_type == F_PIPE && e == EAGAIN) break; + /* If the filesystem is filled up, just ignore + it for now and continue writing when + possible */ + if (f->f_type == F_FILE && e == ENOSPC) + break; + (void) close(f->f_file); /* * Check for EBADF on TTY's due to vhangup() XXX