Re: spamprobe-1.1x7 released
Brian Burton <[email protected]>
| Newsgroups | gmane.mail.spam.spamprobe.general |
|---|---|
| Message-ID | <[email protected]> |
Ray wrote: > On Tue, Mar 29, 2005 at 08:52:05AM -0500, Brian Burton wrote: > >>Ray wrote: >>> rename() guarantees that if _to_ already exists, an instance >>> of _to_ will always exist, even if the system should crash in >>> the middle of the operation. >> >>Well, actually, it does use rename(2). I was speaking generally. It >>uses rename(), rename(), and unlink(). > > In that case, why not just rename() once? Or if you really don't > trust the operating system's guarantee, Trust noone. :-) > hard link the old file to > a backup, rename() and overwrite the old file with the new one, > then unlink the backup. Both methods avoid having a missing file. I'll consider that. All the best, ++Brian ------------------------------------------------------- This SF.net email is sponsored by Demarc: A global provider of Threat Management Solutions. Download our HomeAdmin security software for free today! http://www.demarc.com/info/Sentarus/hamr30