Subject: Re: CVS commit: src/usr.sbin/syslogd
To: Matt Thomas <matt@3am-software.com>
From: Ian Lance Taylor <ian@wasabisystems.com>
List: tech-userlevel
Date: 12/09/2004 23:03:17
Matt Thomas <matt@3am-software.com> writes:

> At 02:38 PM 12/9/2004, Daniel Carosone wrote:
> >On Thu, Dec 09, 2004 at 12:56:47AM +0000, Matt Thomas wrote:
> > > Make syslogd automatically recover from full disks by noticing that the
> > > write error was ENOSPC and either wait for a successfull write or a
> > > different errno.
> >
> >(without having read the change)
> >
> >Will it count and log something like "N messages lost due to disk
> >full" when space is once again available?
> 
> It could but it's not easy since you'd want to the lost count message
> to be emitted before the first successfully written message but since
> a message being successfully written is how you detect that you can
> write again ... it's too late.

Each time a new message comes in, first write out "N messages lost".
If that succeeds, write out the real message.  If not, discard the
real message and increment N.

Ian