[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201110290300.57778.vda.linux@googlemail.com>
Date: Sat, 29 Oct 2011 03:00:57 +0200
From: Denys Vlasenko <vda.linux@...glemail.com>
To: Eric Blake <eblake@...hat.com>
Cc: Pádraig Brady <P@...igbrady.com>,
Coreutils <coreutils@....org>,
linux-kernel <linux-kernel@...r.kernel.org>,
Christian Engelmayer <christian.engelmayer@...quentis.com>,
Al Viro <viro@...iv.linux.org.uk>
Subject: Re: rename("a", "b") would not always remove "a" on success. ?!!
On Friday 28 October 2011 17:42, Eric Blake wrote:
> On 10/28/2011 09:32 AM, Pádraig Brady wrote:
> >> http://pubs.opengroup.org/onlinepubs/9699919799/functions/rename.html
> >>
> >> 'If the old argument and the new argument resolve to either .... or different
> >> directory entries for the same existing file, rename() shall return
> >> successfully and perform no other action.'
> >>
> >> It's incredible they had audacity to put such nonsense into standard.
> >>
> >> The page says in "RATIONALE" section:
> >>
> >> 'The specification that if old and new refer to the same file is
> >> intended to guarantee that:
> >>
> >> rename("x", "x");
> >>
> >> does not remove the file.'
> >>
> >> Why didn't they just explicitly say that they actually want THIS
> >> particular case to work correctly, not OTHER cases to be fucked up?!
>
> Because it is historical precedent, and changing it now would break
> software that has come to expect this behavior on hard links.
There is centain level of absurdity, after which fixing a goof in standards
makes sense even if it theoretically can break some existing program.
In my opinion, the key word here is "theoritically".
Is there even one real-world program which depends on this?
I bet there is not.
--
vda
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists