When polling master side of pseudo tty for reading, select is just using
common function fhandler_pipe::select_read. This does not work when we do
onlcr conversion (actually, always), read buffer of size 1 and are reading NL.
In this case, first select returns readable descriptor (because there is real
data in master-slave pipe) and first read returns CR. Second select does not
think fd is readable because there is no more data in pipe; still, read from
master side would return NL here.

It _looks_ like adding fhandler_tty_master::select_read that is combination of
fhandler_tty_common::select_read (when need_nl == 0) and
fhandler_null::select_read (when need_nl != 0) should do the job. But I never
programmed in C++ and do not trust myself to fully understand all these method
interaction :(

-andrej

Have a nice DOS!
B >>


--
Want to unsubscribe from this list?
Send a message to [EMAIL PROTECTED]

Reply via email to