bug-hurd
[Top][All Lists]
Advanced

[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 14:35:46 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0

On 6/9/23 14:13, Sergey Bugaev wrote:
Perhaps... but there's another reason I don't particularly like the
idea of doing it on that level.

Yes, your points make sense. No big deal either way,


Do you perhaps mean that POSIX does not require a
newly opened terminal to become your ctty even if you don't pass
O_NOCTTY?

Yes, that's right. The openat rationale mentions this topic.


So if you do pass O_IGNORE_CTTY and the file is not your ctty, you
just get a speedup. If you do pass O_IGNORE_CTTY and the file is your
ctty, you get an fd that refers to your ctty... but doesn't behave
like a ctty fd. Why you would want the latter, I have no idea (but
also it of course wasn't me who came up with O_IGNORE_CTTY, so perhaps
there is a use case).

I don't see why anybody would care if the O_IGNORE_CTTY behavior became the default. And if nobody cares, let's just make it the default. That way, you won't have to change glibc, Gnulib, git, coreutils, etc.

Do you have a scenario whereby making O_IGNORE_CTTY the default would break things? (It wouldn't break things as far as POSIX is concerned.)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]