tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pty attr race/issue

On Fri, Mar 07, 2008 at 10:10:05PM +0000, Christos Zoulas wrote:
> In article <>,
> Manuel Bouyer  <> wrote:
> >On Fri, Mar 07, 2008 at 07:38:26PM +0000, Christos Zoulas wrote:
> >> Why does xenconsole need to open the slave pty? Can't xenconsoled just
> >> open it, set it up the way it wants, then exec xenconsole with fd 0, 1, 2
> >> as the slave pty?
> >
> >Err, no it's not the way it works. You can exec xenconsole later if you
> >want, you don't have to start the console when starting the domU (it wouldn't
> >be convenient for domains started from /etc/rc.d/xendomains)
> File a PR about this then. I understand what is going on and why it is working
> under linux (see the Linux comment in tty_ptm.c). Basically linux grants the
> slave at openpt, and their grantpt is a no-op. Our grantpt does effectively
> a revoke which closes all references to the slave. Next time the slave is
> opened, TS_ISOPEN is not set and the tty gets reset to the original settings.
> We could add a special flag for the pty case to not do the reset.

Do we really want to change this in the kernel ? fvdl@ pointed me to a 
workaround in xenconsoled, which also works for netbsd-4 ...

Manuel Bouyer <>
     NetBSD: 26 ans d'experience feront toujours la difference

Home | Main Index | Thread Index | Old Index