Subject: rename(2) behaviour
To: None <firstname.lastname@example.org, email@example.com>
From: Christian Groessler <firstname.lastname@example.org>
Date: 05/15/2003 23:03:46
I'm posting this also to tech-toolchain, since I encountered the
problem when trying to build a macppc release on a Linux/i386 box.
The release make aborted because of many superfluous inst.xxxxx files
in the destination tree.
They come from nbinstall which does a rename where both old and new
filename exist and are links to the same file.
In a rename, where the old and the new name are links to the same
file, netbsd deletes the old name. Linux does nothing.
OTOH, the netbsd man page explicitly states:
If both from and to are pathnames of the same existing file in the file
system's name space, rename() returns successfully and performs no other
So the actual netbsd behaviour seems to be wrong, it shouldn't delete
the old name.
This is on Linux 2.4.20, NetBSD 1.6.1.