[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#21432: 25.0.50; file-notify-rm-watch (inotify) errors if watched dir
From: |
Eli Zaretskii |
Subject: |
bug#21432: 25.0.50; file-notify-rm-watch (inotify) errors if watched dir is deleted |
Date: |
Mon, 14 Sep 2015 10:08:50 +0300 |
> From: Tassilo Horn <tsdh@gnu.org>
> Cc: Eli Zaretskii <eliz@gnu.org>, 21432@debbugs.gnu.org
> Date: Mon, 14 Sep 2015 08:08:20 +0200
>
> Michael Albinus <michael.albinus@gmx.de> writes:
>
> Hi Michael,
>
> >>> So I think having a validation function is a good idea.
> >>
> >> Yes. I've started to write a prototype for inotify.c, will show when
> >> it works (slow progress, you know :-( )
> >
> > I've committed a patch to the trunk, adding `file-notify-valid-p' and
> > its native implementations in inotify.c and tramp.el. Comments
> > welcome.
I've added a w32 implementation in w32notify.c.
> I've added two tests, one for plain files and one for directories. They
> are "green" right now but I think they should not.
I think you are testing this incorrectly.
> What seems wrong to me is that the descriptors stay valid even when the
> watched file or directory is deleted. For files this might be ok
> (though maybe inotify-specific) because when I create a new file with
> the same name, the watch will trigger.
>
> However, the current hehavior is certainly wrong for directories. When
> I deleted the watched directory, the descriptor is still valid, but
> calling file-notify-rm-watch on it signals an error.
AFAIR, filenotify.el watches the parent directory of the
file/directory you asked it to watch. So to see the invalid-p method
in action you need to remove the parent, not the directory itself.
- bug#21432: 25.0.50; file-notify-rm-watch (inotify) errors if watched dir is deleted, (continued)
- bug#21432: 25.0.50; file-notify-rm-watch (inotify) errors if watched dir is deleted, Michael Albinus, 2015/09/08
- bug#21432: 25.0.50; file-notify-rm-watch (inotify) errors if watched dir is deleted, Eli Zaretskii, 2015/09/08
- bug#21432: 25.0.50; file-notify-rm-watch (inotify) errors if watched dir is deleted, Michael Albinus, 2015/09/08
- bug#21432: 25.0.50; file-notify-rm-watch (inotify) errors if watched dir is deleted, Michael Albinus, 2015/09/12
- bug#21432: 25.0.50; file-notify-rm-watch (inotify) errors if watched dir is deleted, Eli Zaretskii, 2015/09/12
- bug#21432: 25.0.50; file-notify-rm-watch (inotify) errors if watched dir is deleted, Michael Albinus, 2015/09/12
- bug#21432: 25.0.50; file-notify-rm-watch (inotify) errors if watched dir is deleted, Michael Albinus, 2015/09/13
- bug#21432: 25.0.50; file-notify-rm-watch (inotify) errors if watched dir is deleted, Tassilo Horn, 2015/09/14
- bug#21432: 25.0.50; file-notify-rm-watch (inotify) errors if watched dir is deleted,
Eli Zaretskii <=
- bug#21432: 25.0.50; file-notify-rm-watch (inotify) errors if watched dir is deleted, Tassilo Horn, 2015/09/14
- bug#21432: 25.0.50; file-notify-rm-watch (inotify) errors if watched dir is deleted, Tassilo Horn, 2015/09/14
- bug#21432: 25.0.50; file-notify-rm-watch (inotify) errors if watched dir is deleted, Eli Zaretskii, 2015/09/14
- bug#21432: 25.0.50; file-notify-rm-watch (inotify) errors if watched dir is deleted, Michael Albinus, 2015/09/14
- bug#21432: 25.0.50; file-notify-rm-watch (inotify) errors if watched dir is deleted, Eli Zaretskii, 2015/09/15
- bug#21432: 25.0.50; file-notify-rm-watch (inotify) errors if watched dir is deleted, Michael Albinus, 2015/09/15
- bug#21432: 25.0.50; file-notify-rm-watch (inotify) errors if watched dir is deleted, Eli Zaretskii, 2015/09/15
- bug#21432: 25.0.50; file-notify-rm-watch (inotify) errors if watched dir is deleted, Michael Albinus, 2015/09/15
- bug#21432: 25.0.50; file-notify-rm-watch (inotify) errors if watched dir is deleted, Eli Zaretskii, 2015/09/15
- bug#21432: 25.0.50; file-notify-rm-watch (inotify) errors if watched dir is deleted, Michael Albinus, 2015/09/15