Re: RFC: Serial port DTR/RTS - O_<something>

From: H. Peter Anvin

Date: Sat Nov 15 2025 - 19:47:57 EST


On 2025-11-15 13:29, Ned Ulbricht wrote:
> |
> | O_TTY_INIT
>
> https://pubs.opengroup.org/onlinepubs/9799919799/
>
> That's what motivates my first-glance preference to name this new flag,
> which will have approximately opposite behavior, as O_TTY_NOINIT.
>
> But as a generic abstraction, I more prefer O_KEEP.
>

O_KEEP seems a little vague, but O_KEEPCONFIG seems like a decent name.

It seems like we don't have several new flags:

O_EXEC
O_SEARCH
O_CLOFORK
O_TTY_INIT
O_RSYNC
O_NOCLOBBER

Some of them *may* be possible to construct with existing Linux options, I'm
not 100% sure; in particular O_SEARCH might be the same as (O_DIRECTORY|O_PATH).

O_NOCLOBBER looks like an odd in-between between O_EXCL and
(O_EXCL|O_NOFOLLOW); stated to be specifically to implement the shell
"noclobber" semantic.

-hpa