bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#35418: [PATCH] Don't poll auto-revert files that use notification


From: Eli Zaretskii
Subject: bug#35418: [PATCH] Don't poll auto-revert files that use notification
Date: Sat, 27 Apr 2019 19:52:56 +0300

> From: Mattias Engdegård <mattiase@acm.org>
> Date: Sat, 27 Apr 2019 18:19:36 +0200
> Cc: Eli Zaretskii <eliz@gnu.org>, 35418@debbugs.gnu.org
> 
> The reason is that file-notify does not call inotify-add-watch on individual 
> files, as in your example above, but on their containing directory ("/tmp" in 
> your example). When monitoring a directory with two hard links to the same 
> file, and the file is changed, inotify (sensibly) only reports a change to 
> one of the links (the one employed for the change). Thus, the logic is in the 
> Linux kernel, not in filenotify.
> 
> For kqueue it is different: here, changes to files are not reported when a 
> watch is monitoring their directory, so filenotify.el sets kqueue watches on 
> each file instead. The same could be done with inotify (and w32notify, if I 
> read the code right), but watching directories has certain advantages.

w32notify cannot watch a single file, because the Windows notification
machinery is directory-oriented, and reports all changes in the
directory.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]