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

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

bug#26126: 26.0.50; file-notify-rm-watch removes arbitrary watches


From: Andreas Politz
Subject: bug#26126: 26.0.50; file-notify-rm-watch removes arbitrary watches
Date: Sat, 25 Mar 2017 18:26:17 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Michael Albinus <michael.albinus@gmx.de> writes:

>> For that to work, I had to restrict the flag-usage by the user to those
>> not having an effect on the shared descriptor.
>
> What does this mean in practice? Any restriction we need to document?

I don't think so, apart from inotify-add-watch's doc-string.  It means a
user of inotify can't use the following flags

IN_EXCL_UNLINK - already mentioned
IN_MASK_ADD - modifies the (shared) descriptor
IN_ONESHOT - monitor for one event only
IN_ONLYDIR - From the man page:
"Watch  pathname  only if it is a directory.  Using this flag provides an 
applica‐
tion with a race-free way of ensuring that the monitored object is a directory."

This sounded esoteric enough for it to be excluded, i.e. I don't know
the exact behavior on a already existing descriptor and it does not
seam to be useful for our use-case.

> I'm willing to push the patch in your name, if you provide me a ChangeLog
> style commit message. 

OK, will do.

> This deserves a docstring.
>
> Please quote `file-notify--watch'.
>
> Don't reformat the docstring, keep the first line as complete
> sentence.

OK.

>> -      (dolist (action actions)
>
>> +      (while actions
>> +        (let ((action (pop actions)))
>
> Being curious: why did you change this?

actions is set to nil at one point inside the loop, but dolist creates
an alias for it, such that setting the variable would have no effect.

>> -excl-unlink
>> -mask-add
>> -oneshot
>> -onlydir
>
> Maybe we shall say explicitely, that those inotify events are not supported.

> Typo.

OK.

Thanks for the feedback,

-ap





reply via email to

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