Comment 4 for bug 1123267

Revision history for this message
Tyler Hicks (tyhicks) wrote : Re: [Bug 1123267] Re: File goes missing for a short period of time after saving it using VIM

On 2013-02-12 22:41:14, Michael P. Jung wrote:
> Maybe the output of strace can help. I attached to the process right
> after typing ":w" in VIM and then pressed enter to catch less keyboard
> events:

Thanks, this is helpful.

<snip>

> unlink("/home/bikeshedder/.vimbackup/x~") = 0
> rename("x", "/home/bikeshedder/.vimbackup/x~") = 0
> fsync(4) = 0
> open("x", O_WRONLY|O_CREAT|O_TRUNC, 0664) = 3
> write(3, "\n", 1) = 1
> fsync(3) = 0
> stat("x", {st_mode=S_IFREG|0664, st_size=1, ...}) = 0
> stat("x", {st_mode=S_IFREG|0664, st_size=1, ...}) = 0
> close(3) = 0
> chmod("x", 0100664) = 0
> setxattr("x", "system.posix_acl_access", "\x02\x00\x00\x00\x01\x00\x06\x00\xff\xff\xff\xff\x04\x00\x06\x00\xff\xff\xff\xff \x00\x04\x00\xff\xff\xff\xff", 28, 0) = 0
> write(1, " 1L, 1C [w]", 11) = 11
> stat("/home/bikeshedder/x", {st_mode=S_IFREG|0664, st_size=1, ...}) = 0

The stat() on the file was successful, meaning that the file exists and things
are working as expected without any sort of a delay. I'm having trouble
imagining how another process (the compiler in your situation) would have any
problem accessing the file.