Quoting Henrik Grindal Bakken <[EMAIL PROTECTED]>:
> Henrik Grindal Bakken <[EMAIL PROTECTED]> writes:
> > Dag Wieers <[EMAIL PROTECTED]> writes:
> >> Revelation cannot handle a disk-full situation. I just lost all my
> >> passwords (file was 0 bytes in size).
> > It shouldn't be that hard to protect against either. Just write to a
> > temporary file and rename(2) when finished (of course, provided the
> > close(2) and all write(2) calls succeeded.
> But as you said, that breaks hard-links (who has hard-links to such
> files anyway?). However, what if you first write to a temporary file,
> then to the real file, and unlink the temp file if the close() and all
> write()s to the real file succeeded?
Well, there are a few issues with this; one is that it introduces alot of
overhead, especially when saving over network. Another is when one only has
write-access to the data file and not the parent directory, causing the creation
of the tempfile to fail.
But then again, since these are very important data, it would make sense to do
everything possible to prevent data loss.
I'll give it some more thought when I'm back home, thanks alot for the input.