From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.bugs Subject: bug#21432: 25.0.50; file-notify-rm-watch (inotify) errors if watched dir is deleted Date: Mon, 14 Sep 2015 08:08:20 +0200 Message-ID: <87zj0pild7.fsf@gnu.org> References: <87k2s15sfd.fsf@gnu.org> <83oahc7vxr.fsf@gnu.org> <87lhcgvr1t.fsf@gmx.de> <87r3m4hrfq.fsf@gmx.de> <83fv2jbrkm.fsf@gnu.org> <87zj0rh5lb.fsf@gmx.de> <87h9myt96l.fsf@gmx.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1442210970 30978 80.91.229.3 (14 Sep 2015 06:09:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 14 Sep 2015 06:09:30 +0000 (UTC) Cc: 21432@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 14 08:09:12 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZbMwx-0003oQ-Nq for geb-bug-gnu-emacs@m.gmane.org; Mon, 14 Sep 2015 08:09:11 +0200 Original-Received: from localhost ([::1]:38578 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbMww-00028T-RD for geb-bug-gnu-emacs@m.gmane.org; Mon, 14 Sep 2015 02:09:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41472) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbMws-00027H-GQ for bug-gnu-emacs@gnu.org; Mon, 14 Sep 2015 02:09:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZbMwp-0006Ie-7G for bug-gnu-emacs@gnu.org; Mon, 14 Sep 2015 02:09:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:39010) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbMwp-0006Ia-3y for bug-gnu-emacs@gnu.org; Mon, 14 Sep 2015 02:09:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZbMwo-0003GD-Li for bug-gnu-emacs@gnu.org; Mon, 14 Sep 2015 02:09:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tassilo Horn Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 14 Sep 2015 06:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21432 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21432-submit@debbugs.gnu.org id=B21432.144221090812491 (code B ref 21432); Mon, 14 Sep 2015 06:09:02 +0000 Original-Received: (at 21432) by debbugs.gnu.org; 14 Sep 2015 06:08:28 +0000 Original-Received: from localhost ([127.0.0.1]:59453 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZbMwF-0003FP-KL for submit@debbugs.gnu.org; Mon, 14 Sep 2015 02:08:27 -0400 Original-Received: from out3-smtp.messagingengine.com ([66.111.4.27]:53061) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZbMwC-0003FG-LX for 21432@debbugs.gnu.org; Mon, 14 Sep 2015 02:08:25 -0400 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 479DC20565 for <21432@debbugs.gnu.org>; Mon, 14 Sep 2015 02:08:24 -0400 (EDT) Original-Received: from frontend1 ([10.202.2.160]) by compute6.internal (MEProxy); Mon, 14 Sep 2015 02:08:24 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=t3Sd9omWwHlRfBPX3nlLz63UmK8=; b=cTaN+ pRHjFl/wjgFvGbXfZZQI46JdTnWnRRv31IGwa27vB7NYZOd97OoLqEgmCB+WGgee /0Na00V4pBCEy9Io+FAtnisl6zK15cYg6gEN+RIcP3y9YKkWdtG+gLG9oDKByI33 3La68XllxasTJ53cJxXRdlmAFRBR096ZaDf/Vk= X-Sasl-enc: 3SjlcsEuIeD1kl+HOddvDsXgq11Q83sEj4ZCvZnsLQbY 1442210903 Original-Received: from thinkpad-t440p (unknown [2.162.81.74]) by mail.messagingengine.com (Postfix) with ESMTPA id 19E54C00014; Mon, 14 Sep 2015 02:08:22 -0400 (EDT) In-Reply-To: <87h9myt96l.fsf@gmx.de> (Michael Albinus's message of "Sun, 13 Sep 2015 21:23:46 +0200") User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:106500 Archived-At: Michael Albinus 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 know, documentation in the elisp manual is missing. I'll add it > later, and also the native implementation in gfilenotify.c. > > Test cases, anywhere? I've added two tests, one for plain files and one for directories. They are "green" right now but I think they should not. 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. Bye, Tassilo