Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Jul 2002 12:28:40 -0700
From:      Michael Sierchio <kudzu@tenebras.com>
To:        Alfred Perlstein <bright@mu.org>
Cc:        fs@freebsd.org
Subject:   Re: rename hardlinks "works" on FreeBSD, but no-op on others
Message-ID:  <3D3C5CE8.6090607@tenebras.com>
References:  <20020722191522.GA77219@elvis.mu.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Alfred Perlstein wrote:

>   What gives?
> 
> It seems that we do the right thing, however:
> 
> 1) are we standards compliant?
> 2) just for curiousity, why would others silently fail?

We aren't compliant with the Single UNIX Specification, which says
that mv is equivalent to invoking rename(), and the man page for
rename sez

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

The FreeBSD man page claims POSIX.2 compliance for mv, but I don't recall
whether POSIX addresses mv directly.

Obviously you'd only have this happen for files on the same filesystem,
since rename(2) doesn't work otherwise.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-fs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3D3C5CE8.6090607>