Tony Mechelynck wrote:
> 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|.

Cases like mbox files are not so rare. There are many examples of
simultaneously access to single file, but problem exists even without
concurrent modification.

A simple example: editing config file for some daemon. When vim
truncates this file and program read it at the same time (because,
for example, it will be restarted by cron, other administrator or even
by itself) it will be problematic situation. The same matter is if
a program will be run from cron or other program (for example, procmail
from sendmail). Recover option in vim does not help here. Do you suggest
turn off all processes during editing config files?

Vim is used on multiuser and multiprocess systems, so limiting the working
users or simultaneously processes to single one is misunderstanding.
Why do you disrespect problem, especially if there is solution in the
form of proper use of rename(2) syscall, which I mentioned about?

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui