This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Add renameat2 function [BZ #17662]


Carlos O'Donell wrote:

Suggest something like this:

* The library now implements the renameat2 function. On Linux systems that
   support the renameat2 system call this is a wrapper for the kernel support
   and avoids the race conditions present with renameat. No emulation is provide
   and if renameat2 is not supported by the underlying operating system either
   an errno of ENOSYS or EINVAL error will be returned.

This wording doesn't look right, since there is emulation in some cases even when renameat2 is not supported by the underlying operating system. That is, when FLAGS == 0, renameat2 is often emulated via renameat. How about something like this wording instead?

* The library now implements the renameat2 function.  On Linux systems that
  support the renameat2 system call this is a wrapper for kernel support
  and when renameat2's flags are nonzero this should avoid race conditions
  present with renameat.  The renameat2 function fails with an errno of
  ENOSYS or EINVAL when given nonzero flags that cannot be implemented
  atomically by the kernel.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]