From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#24714: delete-directory race condition Date: Mon, 17 Oct 2016 09:19:34 +0300 Message-ID: <83d1izzedl.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1476685222 13635 195.159.176.226 (17 Oct 2016 06:20:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 17 Oct 2016 06:20:22 +0000 (UTC) Cc: 24714@debbugs.gnu.org To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 17 08:20:10 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 1bw1HN-0001op-6R for geb-bug-gnu-emacs@m.gmane.org; Mon, 17 Oct 2016 08:20:09 +0200 Original-Received: from localhost ([::1]:59195 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bw1HP-0002tD-9X for geb-bug-gnu-emacs@m.gmane.org; Mon, 17 Oct 2016 02:20:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60639) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bw1HI-0002s3-Uu for bug-gnu-emacs@gnu.org; Mon, 17 Oct 2016 02:20:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bw1HF-0006pO-Rf for bug-gnu-emacs@gnu.org; Mon, 17 Oct 2016 02:20:04 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57978) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1bw1HF-0006pE-Oa for bug-gnu-emacs@gnu.org; Mon, 17 Oct 2016 02:20:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bw1HF-0001kK-KV for bug-gnu-emacs@gnu.org; Mon, 17 Oct 2016 02:20:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 17 Oct 2016 06:20: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.14766851886688 (code B ref 24714); Mon, 17 Oct 2016 06:20:01 +0000 Original-Received: (at 24714) by debbugs.gnu.org; 17 Oct 2016 06:19:48 +0000 Original-Received: from localhost ([127.0.0.1]:35935 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bw1H2-0001jn-5A for submit@debbugs.gnu.org; Mon, 17 Oct 2016 02:19:48 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:41319) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bw1H1-0001jb-5V for 24714@debbugs.gnu.org; Mon, 17 Oct 2016 02:19:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bw1Gs-0006jq-R3 for 24714@debbugs.gnu.org; Mon, 17 Oct 2016 02:19:41 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:38961) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bw1Gs-0006iR-NV for 24714@debbugs.gnu.org; Mon, 17 Oct 2016 02:19:38 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3264 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bw1Gn-0001Ts-6K; Mon, 17 Oct 2016 02:19:33 -0400 In-reply-to: (message from Glenn Morris on Sun, 16 Oct 2016 22:20:45 -0400) 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:124578 Archived-At: > From: Glenn Morris > Date: Sun, 16 Oct 2016 22:20:45 -0400 > > I believe this is due to a race condition in delete-directory. > Emacs seems to be lacking an equivalent of "rm -rf". > > (delete-directory "/tmp/foo") > > will fail with "No such file or directory" if a file in /tmp/foo > happen to be deleted by some other process in between the time that > delete-directory calls directory-files and the time it calls delete-file. IMO, 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.