[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: coreutils 5.92, rm <dir> on Solaris, bad error message
From: |
Bob Proulx |
Subject: |
Re: coreutils 5.92, rm <dir> on Solaris, bad error message |
Date: |
Wed, 2 Nov 2005 09:32:48 -0700 |
User-agent: |
Mutt/1.5.9i |
Paul Eggert wrote:
> Jim Meyering <address@hidden> writes:
> > + /* Upon a failed attempt to unlink a directory, Solaris 9 sets
> > + errno to EPERM.
>
> One suggestion for the comment. The behavior in question (namely,
> unlink (dir) fails with errno==EPERM) is not just Solaris 9: it's
> required by POSIX. Linux is the odd man out here (though I think that
> the Linux behavior is better, actually). See, for example,
> <http://www.linuxbase.org/spec/refspecs/LSB_1.2.0/gLSB/baselib-unlink-3.html>.
>
> So perhaps the comment should read "most non-Linux systems set errno
> to the POSIX-required value EPERM".
If you don't mind additional word-smithing I would say this
differently still. I don't generally like negative logic such as
non-this or not-that and would prefer positive set groups.
Traditional and POSIX systems return EPERM but Linux intentionally
returns EISDIR to improve upon the situation.
Bob