tech-kern archive

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

Re: pty attr race/issue

Manuel Bouyer wrote:
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.

- Frank

Home | Main Index | Thread Index | Old Index