Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-28 23:32 UTC

Message

Re: [milter-greylist] milter-greylist-2.0.2 crash

2006-07-27 by Emmanuel Dreyfus

On Thu, Jul 27, 2006 at 09:22:52AM +0200, Oliver Fromme wrote:
> Shouldn't it be sufficient to open() the dump file right
> from the start and never close() it?  Only always write to
> it, then fsync()+lseek(0).  (And fflush()+rewind() if stdio
> functions are used to write the file.)

The idea is to preserve the file in the event of a crash during the
dump. So the dump is currently done in a temporary file, which is 
moved to replace the original file once the dump completes. 

rename(2) can buy us that. I'm not sure it's possible by using the 
same file.
-- 
Emmanuel Dreyfus
manu@...

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.