[Interest] Behavioural change in QFile/QDir rename

Thiago Macieira thiago.macieira at intel.com
Sat Jun 15 20:48:14 CEST 2019


On Saturday, 15 June 2019 08:58:31 PDT Federico Buti wrote:
> We gave strace a go and we noticed that 5.12 runtime acts differently for
> rename/move operations (see attached compare screenshot). In particular, on
> 5.6 we have an actual rename whereas a link/unlink sequence happens on
> 5.12. That sequence is not detected by our code, generating the failure.

Alternative: upgrade your system to a version that supports the renameat2() 
system call. You need a 3.16 Linux kernel and glibc 2.28.

The link()/unlink() sequence is used on Unix filesystems to prevent rename() 
clobbering existing files, as promised in our API, but they're only attempted 
if renameat2() fails.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel System Software Products






More information about the Interest mailing list