Re: TTY: tty_port questions
From: Alan Cox
Date: Sun Mar 25 2012 - 17:09:27 EST
On Sun, 25 Mar 2012 18:20:18 +0100
Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:
> On Sun, Mar 25, 2012 at 05:14:37PM +0200, Richard Weinberger wrote:
> > >> 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).
>
> IIRC, vhangup(2) is Linux-specific, so I would be surprised if POSIX had
> anything on it...
vhangup causes a carrier drop event equivalent. The rest of the behavior
is POSIX/SUSv3.
> login(1) from util-linux does vhangup(); login(1) from shadow doesn't.
Shadow assumes the getty cleans the channel I believe.
> The thing is, we don't want to do that when port is in use. And we definitely
> don't want somebody to open the damn thing when it's halfway through getting
> set up. I don't see any natural way to do that exclusion with tty_port -
> port->{count,block_open} is protected only by a spinlock and port setup
> we need to do is blocking...
How does this differ from a hardware hotplug ?
Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/