From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Andreas Politz Newsgroups: gmane.emacs.bugs Subject: bug#26126: 26.0.50; file-notify-rm-watch removes arbitrary watches Date: Sat, 25 Mar 2017 18:26:17 +0100 Message-ID: <87mvc9e092.fsf@luca> References: <87r31x9ulw.fsf@luca> <87shmcney8.fsf@detlef> <87efxw7xvc.fsf@luca> <87mvcjophx.fsf@detlef> <87tw6rssoi.fsf@luca> <87pohfkmvh.fsf@detlef> <87lgs2sobr.fsf@luca> <87y3w2gywc.fsf@detlef> <8737e8excq.fsf@luca> <877f3el80j.fsf@luca> <87a889jvvw.fsf@detlef> <87shm1fhx0.fsf@luca> <87efxl8er5.fsf@detlef> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1490462838 12471 195.159.176.226 (25 Mar 2017 17:27:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 25 Mar 2017 17:27:18 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: 26126@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Mar 25 18:27:14 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1crpT0-0001w1-2D for geb-bug-gnu-emacs@m.gmane.org; Sat, 25 Mar 2017 18:27:06 +0100 Original-Received: from localhost ([::1]:38087 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1crpT6-00042f-3y for geb-bug-gnu-emacs@m.gmane.org; Sat, 25 Mar 2017 13:27:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59988) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1crpSz-00042N-Rk for bug-gnu-emacs@gnu.org; Sat, 25 Mar 2017 13:27:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1crpSw-0004g4-I9 for bug-gnu-emacs@gnu.org; Sat, 25 Mar 2017 13:27:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:46358) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1crpSw-0004fm-EQ for bug-gnu-emacs@gnu.org; Sat, 25 Mar 2017 13:27:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1crpSw-00006W-2u for bug-gnu-emacs@gnu.org; Sat, 25 Mar 2017 13:27:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andreas Politz Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Mar 2017 17:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26126 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 26126-submit@debbugs.gnu.org id=B26126.1490462799372 (code B ref 26126); Sat, 25 Mar 2017 17:27:02 +0000 Original-Received: (at 26126) by debbugs.gnu.org; 25 Mar 2017 17:26:39 +0000 Original-Received: from localhost ([127.0.0.1]:44557 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1crpSZ-00005v-C3 for submit@debbugs.gnu.org; Sat, 25 Mar 2017 13:26:39 -0400 Original-Received: from gateway-a.fh-trier.de ([143.93.54.181]:41761) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1crpSY-00005g-34 for 26126@debbugs.gnu.org; Sat, 25 Mar 2017 13:26:38 -0400 X-Virus-Scanned: by Amavisd-new + McAfee uvscan + ClamAV [Rechenzentrum Hochschule Trier (RZ/HT)] Original-Received: from localhost (ip5f5bdecf.dynamic.kabel-deutschland.de [95.91.222.207]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: politza) by gateway-a.fh-trier.de (Postfix) with ESMTPSA id B8A09179AD71; Sat, 25 Mar 2017 18:26:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha1; c=simple/simple; d=hochschule-trier.de; s=default; t=1490462779; bh=8nF1pfAsCdV4dx+Vdfm3n5Y+JII=; h=From:To:Cc:Subject:References:Date:In-Reply-To:Message-ID: MIME-Version:Content-Type:Content-Transfer-Encoding; b=NzbA27q6ESCEZst66NjTBotZe0URJRsBK+GpOroLT082xo3/JZ/n6Lr9lA7O7bWsS eAFHkCMXvPlMyQCy6dChkguK9llfYnbBk5JRR1LkoC7rjtz3XNddrAGwi2jWJ7u195 p6OjIjuGeCngXs5bDVbXkcOW1mp+HvXSlAxyrX6k= In-Reply-To: <87efxl8er5.fsf@detlef> (Michael Albinus's message of "Sat, 25 Mar 2017 18:09:34 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:130946 Archived-At: Michael Albinus 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 a= pplica=E2=80=90 tion with a race-free way of ensuring that the monitored object is a direct= ory." 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.=20 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 support= ed. > Typo. OK. Thanks for the feedback, -ap