Matt Wozniski wrote: > rename(2) doesn't do everything needed. Right, but current behaviour is even worse. We can't protect if somebody create file while vim saves it due to system limitations, but we can protect against completely lack of file or situation when it is partially written.
> rename() would break the link, which probably isn't what you want an > editor to do... Right, but definitely there are fewer multi hard linked files than singles. Again, we can't protect against such situation because of POSIX syscalls nature, so maybe vim should identify if there is hard link and unless, it will do atomic file replacement. I know, there is another race condition (between stat() and rename()) but it is more unlikely case. --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---