Lars skrev:Det finns en ganska kul buggrapport om det där,
bugg #207369. Editorn "vi" kan vara ganska skrämmande

hehe, ja den där var ju ganska kul.
Men varför lär man egentligen anvnäda "visudo"? Använder man vanliga vi/vim så får man ju fortfarande en varning om att filen är öppen i en annan session:
E325: ATTENTION
Found a swap file by the name ".test.swp"
owned by: emil dated: Fri Mar 28 11:48:20 2008
file name: ~emil/test
modified: no
user name: emil host name: MacBooken.local
process ID: 8469 (still running)
While opening file "test"
(1) Another program may be editing the same file.
If this is the case, be careful not to end up with two
different instances of the same file when making changes.
Quit, or continue with caution.
(2) An edit session for this file crashed.
If this is the case, use ":recover" or "vim -r test"
to recover the changes (see ":help recovery").
If you did this already, delete the swap file ".test.swp"
to avoid this message.
Swap file ".test.swp" already exists!
[O]pen Read-Only, (E)dit anyway, (R)ecover, (Q)uit, (A)bort: