From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.bugs Subject: bug#24714: delete-directory race condition Date: Tue, 18 Oct 2016 12:50:32 -0400 Message-ID: References: <83d1izzedl.fsf@gnu.org> <87shruj4fs.fsf@linux-m68k.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1476809671 13597 195.159.176.226 (18 Oct 2016 16:54:31 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 18 Oct 2016 16:54:31 +0000 (UTC) User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) Cc: 24714@debbugs.gnu.org To: Andreas Schwab Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 18 18:54:27 2016 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 1bwXeX-0001Zz-SJ for geb-bug-gnu-emacs@m.gmane.org; Tue, 18 Oct 2016 18:54:13 +0200 Original-Received: from localhost ([::1]:42890 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bwXea-00055L-2u for geb-bug-gnu-emacs@m.gmane.org; Tue, 18 Oct 2016 12:54:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33058) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bwXbS-0002qg-HE for bug-gnu-emacs@gnu.org; Tue, 18 Oct 2016 12:51:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bwXbR-0001aV-Ss for bug-gnu-emacs@gnu.org; Tue, 18 Oct 2016 12:51:02 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:60354) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1bwXbR-0001aK-P2 for bug-gnu-emacs@gnu.org; Tue, 18 Oct 2016 12:51:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bwXbR-0006ue-Im for bug-gnu-emacs@gnu.org; Tue, 18 Oct 2016 12:51:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Glenn Morris Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 Oct 2016 16:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24714 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24714-submit@debbugs.gnu.org id=B24714.147680944526547 (code B ref 24714); Tue, 18 Oct 2016 16:51:01 +0000 Original-Received: (at 24714) by debbugs.gnu.org; 18 Oct 2016 16:50:45 +0000 Original-Received: from localhost ([127.0.0.1]:38311 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bwXbB-0006u6-7E for submit@debbugs.gnu.org; Tue, 18 Oct 2016 12:50:45 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:41982) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bwXb9-0006tr-Cx for 24714@debbugs.gnu.org; Tue, 18 Oct 2016 12:50:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bwXb3-0001TK-Bu for 24714@debbugs.gnu.org; Tue, 18 Oct 2016 12:50:38 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:38180) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bwXb0-0001Sm-Vh; Tue, 18 Oct 2016 12:50:35 -0400 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1bwXaz-0005SQ-Af; Tue, 18 Oct 2016 12:50:33 -0400 X-Spook: MS-13 Drug Echelon Cain and Abel Contamination Kennedy X-Ran: ($Mb3S}k7)q2B$1YnhH:fiqce:RK7=7xd-5M2)13H,;c,!ULXkE8e3cp-Z*VL6ymEIQ_@T X-Hue: blue X-Attribution: GM In-Reply-To: <87shruj4fs.fsf@linux-m68k.org> (Andreas Schwab's message of "Mon, 17 Oct 2016 19:00:55 +0200") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:124643 Archived-At: Andreas Schwab wrote: > That is ok. The operation cannot successfully be completed in this case. > >> Frankly I don't see how Emacs's delete-directory can work reliably as >> currently implemented. > > A property it shares with any other operation recursing on directories, > in Emacs or elsewhere. That's interesting. I'd assumed there was a "Right Way" to do it, and that it would be whatever coreutil's rm did. If not then we are back to: > delete-directory should simply catch ENOENT errors and ignore them > when it deletes files and subdirectories under the "recursive" option. > Other errors should signal an error as they do now. This doesn't seem possible without changes at the C level. Should there be a standard Lisp error for ENOENT? Currently report_file_errno only does EEXIST -> file_already_exists. Or should delete-file get a FORCE argument akin to "rm -f"?