[PATCH] Add renameat2 function [BZ #17662]

Florian Weimer fweimer@redhat.com
Wed Jul 4 20:26:00 GMT 2018


On 07/04/2018 10:13 PM, Carlos O'Donell wrote:
> This is a good suggestion, and I think Florian should work on something
> going into the manual to document the behaviour.

We do not have any documentation for the *at functions at present.  I 
find it difficult to document renameat2 without reference to openat and 
a generic description of the AT_* flags.  I feel this is something we 
should tackle after the release.

Once the patch is in, I will propose something for the existing manual 
page, documenting the EINVAL behavior of the glibc wrapper and the 
existence of the gnulib implementation.

> You position Gnulib's implementation as having no drawbacks, but this
> is not true. The API has a race, and it is something which along with
> other similar racy APIs has caused difficult to solve problems a the
> distribution level.

And as Joseph pointed out, there is a different emulation strategy with 
a different failure mode (use link and potentially leave behind a 
hard-linked file under both names).

Thanks,
Florian



More information about the Libc-alpha mailing list