GNU bug report logs -
#24714
delete-directory race condition
Previous Next
Reported by: Glenn Morris <rgm <at> gnu.org>
Date: Mon, 17 Oct 2016 02:21:01 UTC
Severity: normal
Found in version 25.1
Fixed in version 26.1
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: Glenn Morris <rgm <at> gnu.org>
> Cc: 24714 <at> debbugs.gnu.org
> Date: Mon, 17 Oct 2016 11:52:31 -0400
>
> Eli Zaretskii wrote:
>
> >> 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.
>
> I don't think that's enough, since a file could equally well be
> _created_ by some other process after delete-directory calls directory-files.
It will solve your use case, with files under /tmp, won't it? A
partial solution is better than no solution at all, IMO.
> Frankly I don't see how Emacs's delete-directory can work reliably as
> currently implemented.
Patches to reimplement it are also welcome.
This bug report was last modified 8 years and 263 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.