Ah, you talk about symlinks, while the referenced mail talks about
hardlinks. That's where my initial confusion came from.

I confirm that mv is not atomic in dapper, hardy and intrepid when using
hardlinks:

$ echo foo >foo; echo bar > bar; ln foo foo.backup
$ strace  mv bar foo
[...]
access("foo", W_OK)                     = 0
unlink("foo")                           = 0
rename("bar", "foo")                    = 0
[...]

As for symlinks, I used this test case:

$ rm -f *; ln -s file1 link; ln -s file2 link.new; strace -e
access,rename,unlink mv link.new link

In Hardy and Intrepid I get the correct behaviour:

rename("link.new", "link")              = 0

while in Dapper I get:

unlink("link")                          = 0
rename("link.new", "link")              = 0

I checked the intrepid sources, and this is covered by tests/mv/atomic
(with pretty much the same approach).

-- 
mv for symlinks on dapper is not atomic
https://bugs.launchpad.net/bugs/262811
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to