GNU bug report logs -
#21432
25.0.50; file-notify-rm-watch (inotify) errors if watched dir is deleted
Previous Next
Reported by: Tassilo Horn <tsdh <at> gnu.org>
Date: Tue, 8 Sep 2015 06:37:01 UTC
Severity: normal
Found in version 25.0.50
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
> From: Michael Albinus <michael.albinus <at> gmx.de>
> Cc: Tassilo Horn <tsdh <at> gnu.org>, 21432 <at> debbugs.gnu.org
> Date: Sat, 12 Sep 2015 12:18:01 +0200
>
> Michael Albinus <michael.albinus <at> gmx.de> writes:
>
> > Eli Zaretskii <eliz <at> gnu.org> writes:
> >
> >>> I don't have a strong opinion about what the right behavior would be but
> >>> at least it seems inconsistent that you get the error only with deleted
> >>> directories.
> >>
> >> There is no "right" behavior. What you see is what the back-end
> >> reports to us. If we want Emacs to be smarter, it's the job of the
> >> application, not of filenotify.el.
> >
> > Well, filenotify.el shall abstract from the different back-ends. Being
> > quiet when the native rm-watch fails seems to be appropriate.
>
> I've checked, all three Emacs libraries inotify, gfilenotify and
> w32notify return an error when *-rm-watch detects a problem.
> `file-notify-rm-watch' could propagate this error. The manual
> shall be extended then.
But the issue comes up before you remove the watch. You have a watch
that is in fact inoperable, but the application might not know about
that, or get hit by a signal out of nowhere.
So I think having a validation function is a good idea.
> At least inotify removes a watch internally, when it detects that the
> file/directoy to be watched does not exist any longer.
That's a bug, IMO: it shouldn't.
> gfilenotify and w32notify do not seem to to care.
In w32notify, I did that on purpose: it's not the business of the tail
to wag the dog. Low-level functions has no business calling
higher-level APIs on their own.
> Shall we unify this behaviour? I'm not in favor of the inotify
> behaviour, the libraries shall raise a final signal instead that the
> watch is stopped. filenotify shall propagate this then, for example as
> `stopped' event or something like this.
I don't think you can easily raise a signal. I think we should
provide a validate function for the applications to use.
> Last point, I've observed that inotify and gfilenotify raise a
> `file-notify-error' when needed. w32notify raises a `file-error'.
> Shouldn't it raise also `file-notify-error'?.
Yes, it should. ('file-notify-error' didn't exist when I developed
w32notify.c.)
This bug report was last modified 9 years and 246 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.