On Wed, Dec 14, 2005 at 06:30:05PM -0500, Sam Varshavchik wrote:
> John Morrissey writes:
> >I noticed that if the stat() on Maildir/quotawarn fails, the quota
> >warning is still delivered. Since everything else seems to fail fast,
> >I've modified the check to behave similarly if the stat() fails and
> >errno != ENOENT.
> 
> Why should that matter?

If stat(2) calls are failing (due to I/O errors, for example), quota warning
messages will be delivered more often than 24 hours apart. It's a good
defensive programming measure; we only care about two cases: when stat(2)
returns success and when stat(2) fails due to ENOENT. Any other failure is
due to some unknown error condition. The rest of the code punts on error, so
why shouldn't this?

john
-- 
John Morrissey          _o            /\         ----  __o
[EMAIL PROTECTED]        _-< \_          /  \       ----  <  \,
www.horde.net/    __(_)/_(_)________/    \_______(_) /_(_)__


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to