Lyndon wrote:
On Feb 1, 2014, at 2:30 PM, David Levine <levinedl(_at_)acm(_dot_)org> wrote:
rename allows the new filename to refer
to the old file, even if very briefly. So I removed that
rename.
If it does, it's horribly broken. ISO C demands that rename() be atomic
- that's the whole reason for its existence.
Well, that's the way it's documented. This is when an existing
file is in the way of the new name.
I went with mkstemps(3), where available. If not available,
it tries link(2), and if that fails, rename(2).
David
_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers