Adam Osuchowski wrote:
Some time ago I wrote here about race condition during file saving
(http://groups.google.com/group/vim_dev/tree/browse_frm/month/2009-01/0049693b73a6a1e6).
Some of you didn't share my opinion about this problem and said
File systems is not databases with ACID
Adam Osuchowski wrote:
fd = open(file);
read(fd, buffer, size);
close(fd);
copy(file, file~);
[...here user edits file...]
fd = open(file.tmp, O_WRONLY|O_CREAT|O_TRUNC);
write(fd, new content of file);
close(fd);
chmod(file.swp, mode);
Some time ago I wrote here about race condition during file saving
(http://groups.google.com/group/vim_dev/tree/browse_frm/month/2009-01/0049693b73a6a1e6).
Some of you didn't share my opinion about this problem and said
File systems is not databases with ACID properties. Ok, I agree and know
it is