Vim creating a 4193 file, results in wrong readings by inotify

128 views
Skip to first unread message

Pablo Olmos de Aguilera Corradini

unread,
Sep 30, 2014, 2:49:30 PM9/30/14
to vim...@googlegroups.com
Trying to debug having some tests running twice using guard gem and rspec, I realized that the problem was actually vim that creates a file called `4193`. I found a discussion in 2009*, but it has to do with windows.

Basically the problem was that while rspec is running, the listen gem found that infame file and then makes it run again.

Using inotifywatch -m, I can see the file is being created:

foo/ CREATE 4913
foo/ OPEN 4913
foo/ ATTRIB 4913
foo/ CLOSE_WRITE,CLOSE 4913
foo/ DELETE 4913

I found two things I believe they might be interesting:

1. This happens after the first save, so I guess it has to do over existing files.
2. I found that running this with no vimrc, `vim -u NONE -U none`, doesn't show this problem. After a lot of trial & error, I found that the problem has to do specifically with the `set nocompatible` option. Even more, just running `set compatible` and then saving the document, doesn't create/delete the 4913 file.

Is this actually the expected behaviour or is it a strange bug?

I know the offending line is this one: https://code.google.com/p/vim/source/browse/src/fileio.c#3693, but I still don't get it :c

* https://groups.google.com/d/topic/vim_dev/sppdpElxY44/discussion

Reply all
Reply to author
Forward
0 new messages