-
Notifications
You must be signed in to change notification settings - Fork 822
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
entr and improper inotify events #2507
Comments
From #216 (message): [edit- better link and quote]
|
The Build 14926 release notes seem to indicate that that What is the current list of supported events? |
The release notes for 14926 say "Inotify support for files modified through WSL". In Folo's post, the files were not modified though WSL; they were modified with That said, regarding the statement from the devs: "...NT cannot return the equivalent events" |
@therealkenc, thanks for pointing out that this is not WSL. Not having a close event is a problem, for this this application that still might be okay if there was a mapping from. |
@therealkenc Seeing that a filesystem filter driver can receive IRP_MJ_CLOSE I would say that there is no inherent limitations that prevents this from being implemented. |
Indeed. But you would have to convince the user of For now it appears, based on incomplete information, that they are limited to Nothing prevents anything from being implemented, natch. They p0wn ring zero. Hence the Archer quote. |
Open problems with inotify support are detailed at microsoft/WSL#2507
Open problems with inotify support are detailed at microsoft/WSL#2507
Open problems with inotify support are detailed at microsoft/WSL#2507
Open problems with inotify support are detailed at microsoft/WSL#2507
Closing out old issues, if you're still having issues on newer versions of Windows please open a new issue. |
The OP ask was addressed in WSL2 (by way of ext4). The |
@therealkenc but not on NTFS filesystems? |
entr is a small, unix-y utility that runs programs in response to changes in files.
Behavior of entr
While entr is notified when a change is made to a file from a Linux program within WSL, it isn't when the change is made from Windows.
For example, if I run entr on a small file, test.txt:
$ echo "test.txt" | entr -p echo "changed"
, then open the file in Notepad, make some changes, and save it, nothing happens. If I open the same file in Vim in another WSL bash terminal, "changed" will be printed several times.It also seems that entr doesn't pick up text appended to a file. If in the other terminal I append to the file:
$ echo "Test String." >> test.txt
. Nothing happens either.Output of inotifywait
If I run
inotifywait -m test.txt
and then in another terminalecho "Test String." >> test.txt
, the following output appears below inotifywait:Performing the same test on Linux shows the expected behavior:
Opening a file in Notepad and saving several changes reveals the following:
Making changes to a file in Linux that inotifywait is monitoring reveals the following:
~ inotifywait -m test.txt Setting up watches. Watches established. test.txt MOVE_SELF test.txt ATTRIB test.txt DELETE_SELF
Tentative Conclusion
It seems like WSL isn't sending the proper inotify events when changes happen to a file, like indicating that a file has been closed. This causes programs like entr to fail.
The text was updated successfully, but these errors were encountered: