Re: spamprobe-1.1x7 released
Ray <[email protected]>
| Newsgroups | gmane.mail.spam.spamprobe.general |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Mar 29, 2005 at 08:52:05AM -0500, Brian Burton wrote: > Ray wrote: > >Why not use rename(2)? I'm not sure about other UNIX-like OSes, > >but OpenBSD's rename(2) claims: > > > > 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, 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. -Ray- ------------------------------------------------------- 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