[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#24714: delete-directory race condition
From: |
Eli Zaretskii |
Subject: |
bug#24714: delete-directory race condition |
Date: |
Mon, 17 Oct 2016 19:11:05 +0300 |
> From: Glenn Morris <rgm@gnu.org>
> Cc: 24714@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.
- bug#24714: delete-directory race condition, Glenn Morris, 2016/10/16
- bug#24714: delete-directory race condition, Paul Eggert, 2016/10/18
- bug#24714: delete-directory race condition, Glenn Morris, 2016/10/18
- bug#24714: delete-directory race condition, Glenn Morris, 2016/10/18
- bug#24714: delete-directory race condition, Eli Zaretskii, 2016/10/19
- bug#24714: delete-directory race condition, Paul Eggert, 2016/10/20
- bug#24714: delete-directory race condition, Daniel Colascione, 2016/10/21
- bug#24714: delete-directory race condition, Andreas Schwab, 2016/10/21
- bug#24714: delete-directory race condition, Daniel Colascione, 2016/10/21