Race condition during file saving

2009-01-03 Fir de Conversatie Adam Osuchowski
There is a race condition in vim 7.2 (and probably in earlier too) on POSIX platforms. Below, there is fragment of strace output related to this problem. stat64(testfile~, 0xbfc35dbc) = -1 ENOENT (No such file or directory) stat64(testfile, {st_mode=S_IFREG|0600, st_size=12, ...}) = 0

Re: Race condition during file saving

2009-01-03 Fir de Conversatie Tony Mechelynck
On 03/01/09 22:03, Adam Osuchowski wrote: There is a race condition in vim 7.2 (and probably in earlier too) on POSIX platforms. Below, there is fragment of strace output related to this problem. stat64(testfile~, 0xbfc35dbc) = -1 ENOENT (No such file or directory)

Re: Race condition during file saving

2009-01-03 Fir de Conversatie Adam Osuchowski
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

Re: Race condition during file saving

2009-01-03 Fir de Conversatie Tony Mechelynck
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,

Re: Race condition during file saving

2009-01-03 Fir de Conversatie Adam Osuchowski
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