public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@nod.at>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Al Viro <viro@ZenIV.linux.org.uk>, Jiri Slaby <jslaby@suse.cz>,
	linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org,
	Jiri Slaby <jirislaby@gmail.com>
Subject: Re: TTY: tty_port questions
Date: Sun, 25 Mar 2012 17:14:37 +0200	[thread overview]
Message-ID: <4F6F365D.5060703@nod.at> (raw)
In-Reply-To: <20120325155143.7ca7cb13@ultron>

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

Am 25.03.2012 16:51, schrieb Alan Cox:
> On Sat, 24 Mar 2012 23:20:01 +0000
> Al Viro <viro@ZenIV.linux.org.uk> wrote:
> 
>> On Mon, Mar 12, 2012 at 11:48:32AM +0000, Alan Cox wrote:
>>
>>>>> It will be. In order to fix the tty locking mess we need to shove a lot
>>>>> of stuff whose lifetime is the lifetime of the physical port somewhere
>>>>> else - the tty_port is that structure.
>>>>>
>>>>
>>>> "It will be" in terms of "not now"? ;-)
>>>
>>> As in, it's the very next step on.
>>
>> FWIW, uml console in default config is basically "start xterm for each VC".
>> What do you suggest to do on vhangup() on one of those?
> 
> What posix says must happen. Which is that the running processes get a
> hangup. So a vhangup() would ensure there were no old apps on the UML
> guess talking to the xterm (eg stealing login credentials, or abusing
> TIOCSTI etc).

Looks like Debian's /bin/login is violating POSIX. AFACT it does not
call vhangup() at all.

> The fact it's an xterm isn't really relevant. That's just the physical
> interface and vhangup is about breaking the logical link. The xterm would
> continue, no reason for it to do otherwise I can see ?
> 

As I wrote in my very first mail, if I implement tty_operations->hangup()
a vhangup() closes the current TTY and the shiny new login shell dies because
read/write() returns EIO.

So, the question is whether tty_port is not suitable for consoles or my driver
(see first mail in thread) is broken.

Thanks,
//richard



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

  reply	other threads:[~2012-03-25 15:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-10 22:26 TTY: tty_port questions Richard Weinberger
2012-03-10 22:51 ` Jiri Slaby
2012-03-10 23:21   ` Richard Weinberger
2012-03-11 11:01     ` Richard Weinberger
2012-03-12 10:26       ` Richard Weinberger
2012-03-12 10:53         ` Alan Cox
2012-03-12 11:15           ` Richard Weinberger
2012-03-12 11:48             ` Alan Cox
2012-03-24 23:20               ` Al Viro
2012-03-25 14:51                 ` Alan Cox
2012-03-25 15:14                   ` Richard Weinberger [this message]
2012-03-25 17:20                     ` Al Viro
2012-03-25 21:09                       ` Alan Cox
2012-03-25 18:31                   ` Al Viro
2012-03-25 21:06                     ` Alan Cox
2012-03-25 22:33                       ` Al Viro
2012-03-28 11:06                         ` Alan Cox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F6F365D.5060703@nod.at \
    --to=richard@nod.at \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@gmail.com \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@ZenIV.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox