3 ms·
Umm, two concurrent rename(2) syscalls to the same destination path will likely both succeed. One of them will win (not be overwritten), but both should succeed
by yencabulator 3y ago
Umm, two concurrent rename(2) syscalls to the same destination path will likely both succeed. One of them will win (not be overwritten), but both should succeed.
If you want atomic creation of a path, where no one else can succeed also, you want link(2) not rename(2).