-
-
Notifications
You must be signed in to change notification settings - Fork 886
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Infinite WRITE events when watching $TMPDIR on MacOS #600
Comments
I can't reproduce this, using c94b93b:
I used :set updatecount=1 to write the swap file more often, played around a bit – seems to be fine. This is with pretty much default macOS and whatever it ships with that:
And Vim 8.2.5032 That is the macOS 12.5 VM I had lying around. I also installed a macOS 13 VM; and using defaults for everything:
And again, all seems fine. Lots of updates because I set updatecount to 1 again, but seems to work fine. Tried a few times. Using Vim 9.0.1991 |
Also there is the test/kqueue.c program, which works identical to fsnotify, but is much more simple. Can you reproduce it with that? Or what does that output? |
Also with the main branch you can set the FSNOTIFY_DEBUG=1 environment variable to print more debug info. |
Describe the bug
When watching
$TMPDIR
(/var/folders/[two chars]/[a bunch of chars]/T
) on MacOS, and editing a file with VI, fsnotify ends up looping unlimitedWRITE
events with no file name.To Reproduce
In one terminal, execute a watch on
$TMPDIR
usinggo run ./cmd/fsnotify/ watch $TMPDIR
. In a seperate terminal, create a file withvi $TMPDIR/foo
, type a single character and save. Saving is not strictly necessary for the loop to trigger. VI writing to the.swp
file should trip the conditionThis condition seems to be limited to
$TMPDIR
with some preliminary testing. The same behaviour does not happen when usingvi
to edit a file in/private/tmp
, for example:Which operating system and version are you using?
M2 Macbook Air
Which fsnotify version are you using?
Main branch commit c94b93b
Did you try the latest main branch?
Yes
The text was updated successfully, but these errors were encountered: