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: Sun, 11 Jun 2023 00:54:47 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0

On 6/10/23 12:13, Sergey Bugaev wrote:

O_IGNORE_CTTY is not about
acquiring a ctty if you don't yet have one (that never happens
implicitly on the Hurd), but about (re)opening your current ctty.

OK, I'm starting to see the distinction now.



I don't know whether any programs actually care about this ctty
feature. Presumably users care? -- as I understand it, this is
intended to be used with job control in the shell

If so, it's a well-kept secret, as Bash doesn't use O_IGNORE_CTTY.

The only program I know of that uses O_IGNORE_CTTY is Emacs, and it's for what appears to be relatively minor optimization when it is opening a file that is a tty. On non-Hurd platforms Emacs instead uses setsid to remove the controlling tty entirely (since the notion of controlling terminal doesn't mix well with how Emacs operates).



reply via email to

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