Subject: rename(2) semantics
To: None <tech-userlevel@NetBSD.ORG>
From: None <frank@fwi.uva.nl>
List: tech-userlevel
Date: 02/09/1996 13:58:37
Today, I noticed that the Solaris 2.5 rename does the following when
applied to 2 identical files (possibly hard linked) [man page quote]:

     If old and new both refer to the  same  existing  file,  the
     rename() function returns successfully and performs no other
     action.

However, the BSD rename(2) is happy to simply first remove the destination,
and then rename the source to it, even if the files are identical.

Which behaviour is correct? Is there a standard that has something to say
about this?

- Frank