rename()

Stefan Bellon sbellon at sbellon.de
Wed Aug 11 23:59:50 PDT 2004


Hi!

On RISC OS, rename(a, b) fails if b already exists. On GNU/Linux,
rename(a, b) just overwrites b if it already exists.

Is there any way to make rename() on RISC OS behave the same. And
moreover, is it possible to make it an atomar operation, i.e. not just
doing unlink(b); rename(a, b)?

It's all about race conditions of concurrent processes.

-- 
Stefan Bellon



More information about the gcc mailing list