Re: Have RESOLVE_* flags superseded AT_* flags for new syscalls?

Aleksa Sarai
2020-03-02T15:05:19Z

[-- Attachment #1: Type: text/plain, Size: 979 bytes --]

On 2020-03-02, David Howells <dhowells@redhat.com> wrote:
> Florian Weimer <fweimer@redhat.com> wrote:
>
> > Regarding open flags, I think the key point for future APIs is to avoid
> > using the set of flags for both control of the operation itself
> > (O_NOFOLLOW/AT_SYMLINK_NOFOLLOW, O_NOCTTY) and properaties of the
> > resulting descriptor (O_RDWR, O_SYNC). I expect that doing that would
> > help code that has to re-create an equivalent descriptor. The operation
> > flags are largely irrelevant to that if you can get the descriptor by
> > other means.
>
> It would also be nice to sort out the problem with O_CLOEXEC. That can have a
> different value, depending on the arch - so it excludes at least three bits
> from the O_* flag set.

Not to mention there are (at least?) three or four different values for
_CLOEXEC for different syscalls...

--
Aleksa Sarai
Senior Software Engineer (Containers)
SUSE Linux GmbH
<https://www.cyphar.com/>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]