[PATCH] D27295: Remove existing file in a separate thread asynchronously.

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 10 14:44:16 PST 2016


Ed Maste <emaste at freebsd.org> writes:

> On 7 December 2016 at 17:34, Rafael Avila de Espindola
> <rafael.espindola at gmail.com> wrote:
>> I think the correct way to this is
>>
>> * Don't remove the existing file.
>> * Create a temporary file with no name using O_TMPFILE
>> * Use renameat to give it the correct name at the end of the link.
>
> O_TMPFILE's not POSIX though so we'd need a fallback path.

Create a dummy name (like we do now) and unlink it immediately.

Cheers,
Rafael


More information about the llvm-commits mailing list