[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 2/2] Use O_IGNORE_CTTY where appropriate
From: |
Paul Eggert |
Subject: |
Re: [PATCH v3 2/2] Use O_IGNORE_CTTY where appropriate |
Date: |
Fri, 9 Jun 2023 11:37:09 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 |
On 2023-06-06 02:21, Sergey Bugaev wrote:
_hurd_port2fd and
_hurd_intern_fd are both public APIs, documented with
"FLAGS are as for `open'; only O_IGNORE_CTTY and O_CLOEXEC are meaningful"
You could change the documentation so that it now says that flags that
imply O_IGNORE_CTTY are also meaningful. That should be fine.
I think it's a good practice to always pass O_IGNORE_CTTY where
it makes sense to
Does your patch do that, for every 'open'-like call?
Maybe with GCC there is a chance, considering it's a GNU project?
Sure. I expect even 'git' will do it if you write the patch, as they
care about performance. Also tar, coreutils, grep, and other "open files
a lot" apps should benefit.
I suppose fopen could add a new 'T' flag, as a GNU extension, that would
add O_IGNORE_CTTY to the open flags.
What would be the compatibility implications of this? -- what if POSIX
later declares that 'T' must mean something else?
I wouldn't worry overmuch about that. We could ask for forgiveness later.
Thinking bigger - why does Hurd mess with this stuff at all? Wouldn't it
be better if O_IGNORE_CTTY was the default, and a different flag
(O_PAY_ATTENTION_TO_CTTY, say :-) enables the ctty dance? POSIX would
allow that behavior, as it does not require the controlling terminal to
be required if O_NOCTTY is not set.
- [PATCH v3 0/2] O_IGNORE_CTTY everywhere, Sergey Bugaev, 2023/06/04
- [PATCH v3 2/2] Use O_IGNORE_CTTY where appropriate, Sergey Bugaev, 2023/06/04
- Re: [PATCH v3 2/2] Use O_IGNORE_CTTY where appropriate, Florian Weimer, 2023/06/05
- Re: [PATCH v3 2/2] Use O_IGNORE_CTTY where appropriate, Paul Eggert, 2023/06/05
- Re: [PATCH v3 2/2] Use O_IGNORE_CTTY where appropriate, Sergey Bugaev, 2023/06/06
- Re: [PATCH v3 2/2] Use O_IGNORE_CTTY where appropriate,
Paul Eggert <=
- Re: [PATCH v3 2/2] Use O_IGNORE_CTTY where appropriate, Sergey Bugaev, 2023/06/09
- Re: [PATCH v3 2/2] Use O_IGNORE_CTTY where appropriate, Paul Eggert, 2023/06/09
- Re: [PATCH v3 2/2] Use O_IGNORE_CTTY where appropriate, Sergey Bugaev, 2023/06/10
- Re: [PATCH v3 2/2] Use O_IGNORE_CTTY where appropriate, Paul Eggert, 2023/06/11
- Re: [PATCH v3 2/2] Use O_IGNORE_CTTY where appropriate, Sergey Bugaev, 2023/06/13
- Re: [PATCH v3 2/2] Use O_IGNORE_CTTY where appropriate, Paul Eggert, 2023/06/14
- Re: [PATCH v3 2/2] Use O_IGNORE_CTTY where appropriate, Sergey Bugaev, 2023/06/16
- Re: [PATCH v3 2/2] Use O_IGNORE_CTTY where appropriate, Paul Eggert, 2023/06/17
- Re: [PATCH v3 2/2] Use O_IGNORE_CTTY where appropriate, Samuel Thibault, 2023/06/18
- Re: [PATCH v3 2/2] Use O_IGNORE_CTTY where appropriate, Sergey Bugaev, 2023/06/19