From: Denys Vlasenko <vda.linux@googlemail.com>
To: Eric Blake <eblake@redhat.com>
Cc: "Pádraig Brady" <P@draigbrady.com>, Coreutils <coreutils@gnu.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
"Christian Engelmayer" <christian.engelmayer@frequentis.com>,
"Al Viro" <viro@zeniv.linux.org.uk>
Subject: Re: rename("a", "b") would not always remove "a" on success. ?!!
Date: Sat, 29 Oct 2011 03:00:57 +0200 [thread overview]
Message-ID: <201110290300.57778.vda.linux@googlemail.com> (raw)
In-Reply-To: <4EAACD51.5060703@redhat.com>
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
next prev parent reply other threads:[~2011-10-29 1:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-28 15:25 rename("a", "b") would not always remove "a" on success. ?!! Denys Vlasenko
2011-10-28 15:32 ` Pádraig Brady
2011-10-28 15:42 ` Eric Blake
2011-10-28 15:58 ` Eric Blake
2011-10-29 1:00 ` Denys Vlasenko [this message]
2011-10-29 1:19 ` richard -rw- weinberger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201110290300.57778.vda.linux@googlemail.com \
--to=vda.linux@googlemail.com \
--cc=P@draigbrady.com \
--cc=christian.engelmayer@frequentis.com \
--cc=coreutils@gnu.org \
--cc=eblake@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.