tech-kern archive

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

Re: pty attr race/issue



On Sat, Mar 08, 2008 at 11:18:54AM +0100, Frank van der Linden wrote:
> Manuel Bouyer wrote:
> >Hi,
> >while working on xen3 xenconsole/xenconsoled I ran into a difference
> >between the linux way of doing pty attributes and ours. On linux setting
> >cfmakeraw() on the master side seems to be enough (especially to kill 
> >echo),
> >while I also had to set it on the slave side of the pty on NetBSD.
> >This didn't get things completely clean, as we could still see some domU 
> >boot
> >lines being echoed back to the domU when the console was connected.
> >  
> We had some issues in OpenSolaris too with the pty behavior expected by 
> xenconsoled, and pygrub. The issues were slightly different, but the 
> workaround may apply to this situation too: have xenconsoled (and the 
> xend Python code for pygrub) open a slave, set its attributes to NOECHO, 
> and just keep it open, doing nothing with it. xenconsole (and pygrub) 
> can still successfully open a slave, as a slave can be opened multiple 
> times. At least, I assume the NetBSD implementation allows this too. 
> When the slave is opened, it will still have the correct settings; they 
> were never reset, since there is still a reference to the slave by the 
> other open fd.

Yes, this works. Thanks !
I commited this workaround to the package.

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index