GNU bug report logs -
#26126
26.0.50; file-notify-rm-watch removes arbitrary watches
Previous Next
Reported by: Andreas Politz <politza <at> hochschule-trier.de>
Date: Thu, 16 Mar 2017 14:16:02 UTC
Severity: normal
Tags: fixed
Found in version 26.0.50
Fixed in version 26.1
Done: Michael Albinus <michael.albinus <at> gmx.de>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Eli Zaretskii <eliz <at> gnu.org> writes:
> Thanks, but I have difficulty reading it. Could you please provide a
> short legend?
Sorry, I forgot to do that.
The first column is the name of the test. The 2nd lists all watched
entities mapped to symbolic names. Further columns list the events for
specific back ends, which may refer to the same names.
Because kqueue does not support watching nonexistent files, in most
cases I did create them before starting to watch. That's why there are
usually no creation events.
In every test, I deleted all participating files as the last step. A
`(timeout n)' event means just that: We waited for n seconds without
receiving a stopped event.
If the event lists a name anon-xyz, it means that it contained the
filename of a non-watched file. This may signify a bug.
All test ran with the last patched I've posted applied.
>> Finally, I'm tempted to suggest to get rid of the flags argument of
>> file-notify-add-watch.
> The flags are there for the operations where the differences matter.
When does it matter ? The callback can just ignore the events its not
interested in. The sole advantage would be reduced complexity, but, of
course, it shouldn't be done, if this is not seen as a sufficient reason.
Also: I think in the end we want to add a layer above filenotify.el,
with the added ability of multiplexing events in a directory to multiple
watches, watching files in that directory. The current implementation
(including the patch) returns a new descriptor for every watch. This is
good for a low-level api, because it is easy to manage.
The downside is, that it does not scale very well. For example every
tramp watch starts a new process and (it seems to me) every w32 watch a
new thread.
And, coming back to the original point, in this case we usually need to
watch with all flags enabled anyway.
-ap
This bug report was last modified 8 years and 55 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.