bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#18499: Possible mv race for hardlinks (rhbz #1141368 )


From: Boris Ranto
Subject: bug#18499: Possible mv race for hardlinks (rhbz #1141368 )
Date: Tue, 18 Nov 2014 17:29:26 +0100

On Mon, 2014-11-17 at 00:28 +0000, Pádraig Brady wrote:
> On 16/11/14 16:35, Paul Eggert wrote:
> > Pádraig Brady wrote:
> >> If we change this, it's much more likely that people will start complaining
> >> about their non overlapping mv instances failing.
> > 
> > I'd far rather deal with those complaints than deal with complaints about 
> > 'mv' silently discarding files.  Either the FreeBSD or the Solaris behavior 
> > would be a real improvement over what we're doing now.  Neither behavior is 
> > as good as having support in the kernel for doing the right thing, but one 
> > step at a time.
> 
> Fair enough. That's 3 votes for changing this.
> I'll work on a patch to fail in this case.
> 
> thanks,
> Pádraig.
> 

I've looked at the code and I was able to identify the part that deals
with the symlinks. I'm attaching the patch that makes mv fail in this
case.

btw: I noticed that cp on two distinct hard links already has this
behaviour, i.e.: 'cp a b' will already exit with cp: 'a' and 'b' are the
same file.

-Boris

reply via email to

[Prev in Thread] Current Thread [Next in Thread]