[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug #17900] rm -f should ignore ENOTDIR
From: |
Paul Eggert |
Subject: |
Re: [bug #17900] rm -f should ignore ENOTDIR |
Date: |
Mon, 02 Oct 2006 23:45:34 -0700 |
User-agent: |
Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux) |
Eric Blake <address@hidden> writes:
> Shouldn't this also include ELOOP?
With ELOOP, we don't know whether the file exists. It could
merely be a symlink chain that's too long. So it's safer
for "rm" to print a diagnostic.
This is in contrast with ENOTDIR, where we know for sure
that the file does not exist.
The POSIX spec is a bit weird here; it says to print a
diagnostic if the file "does not exist". But suppose we
lack permission to search the directory D, and the file D/F
exists. Should "rm -f D/F" report a diagnostic? There's no
way for "rm" to tell that D/F exists here, so there's no way
to implement the POSIX spec as written. In this particular
case GNU rm is cautious and prints a diagnostic; Solaris rm
is lackadaisical and doesn't.
I'd prefer GNU rm to be more cautious in this area, so I
think it should print a diagnostic for ELOOP, as well as for
EACCES.
- [bug #17900] rm -f should ignore ENOTDIR, Andreas Schwab, 2006/10/02
- Re: [bug #17900] rm -f should ignore ENOTDIR, Jim Meyering, 2006/10/02
- Re: [bug #17900] rm -f should ignore ENOTDIR, Eric Blake, 2006/10/02
- Re: [bug #17900] rm -f should ignore ENOTDIR, Jim Meyering, 2006/10/03
- Re: [bug #17900] rm -f should ignore ENOTDIR, Jim Meyering, 2006/10/03
- Re: [bug #17900] rm -f should ignore ENOTDIR, Paul Eggert, 2006/10/03
- Re: [bug #17900] rm -f should ignore ENOTDIR, Jim Meyering, 2006/10/03
- Re: [bug #17900] rm -f should ignore ENOTDIR, Jim Meyering, 2006/10/03
- Re: [bug #17900] rm -f should ignore ENOTDIR,
Paul Eggert <=
- Re: [bug #17900] rm -f should ignore ENOTDIR, Jim Meyering, 2006/10/03
- Re: [bug #17900] rm -f should ignore ENOTDIR, Jim Meyering, 2006/10/03
- Re: [bug #17900] rm -f should ignore ENOTDIR, Eric Blake, 2006/10/03
[bug #17900] rm -f should ignore ENOTDIR, Jim Meyering, 2006/10/08