On 04/01/09 04:19, Adam Osuchowski wrote:
> Tony Mechelynck wrote:
>> See
>> :help backup
>> :help 'backup'
>> :help 'writebackup'
>> :help 'backupcopy'
>> :help timestamp
>
> I try different settings of this variables and there was always the same
> situation:
>
> open("testfile", O_WRONLY|O_CREAT|O_TRUNC, 0600) = 3
> write(3, "test test test\n"..., 15) = 15
>
> So, still there are points in time when file could be empty (after opening
> with O_TRUNC) or partially written (between multiple write syscalls).
> Could you give me a concrete example of values of these settings, which
> could prevent such situations?
I don't know. There're only one keyboard and one display on this
machine, and I try to avoid having several programs modify a single file
simultaneously outside each other's knowledge. The rare case is
/var/spool/mail/root which is appended to by my cron jobs, and truncated
by SeaMonkey after "downloading" the mail to its own mailbox in its
profile. Vim doesn't intervene there.
Vim will try to detect when its editfile has been modified by another
program, but it is not meant to be used in an environment where anything
can be modified simultaneously by any number of actors. If something
goes wrong, you can try to |recover|.
Best regards,
Tony.
--
"The National Association of Theater Concessionaires reported that in
1986, 60% of all candy sold in movie theaters was sold to Roger Ebert."
-- D. Letterman
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---