tty-slave read() patch
Egor Duda
deo@logos-m.ru
Wed Feb 28 08:27:00 GMT 2001
Hi!
i've changed the way fhandler_tty_slave::read communicates with
master. it addresses a couple of problems. currently, when in
non-canonical mode and vmin=1, read() never reads more then 1 byte
from the pipe, even if more input is available. the result is
following: when user presses F1 key in ssh window, this keypress is
actually sent to server not in one packet but in 4. This is very
noticeable on slow links. it also eliminates pipe polling.
Egor. mailto:deo@logos-m.ru ICQ 5165414 FidoNet 2:5020/496.19
tty-slave-read.diff
tty-slave-read.ChangeLog
-------------- next part --------------
2001-02-28 Egor Duda <deo@logos-m.ru>
* fhandler.h (class fhandler_tty_common): New mutex and event to
syncronize input on master tty with slave tty.
* fhandler_tty.cc (fhandler_pty_master::accept_input): Use them to
syncronize with slave.
* fhandler_tty.cc (fhandler_tty_slave::read): Use input mutex and
event to syncronize with master. Do not limit amount of data read
from master to vmin value. Interrupt on signal and return already
read data, if any.
* fhandler_tty.cc (fhandler_tty_slave::open): Handle input mutex and
event.
* fhandler_tty.cc (fhandler_tty_common::close): Ditto.
* fhandler_tty.cc (fhandler_tty_common::set_close_on_exec): Ditto.
* fhandler_tty.cc (fhandler_tty_common::fixup_after_fork): Ditto.
* fhandler_tty.cc (fhandler_tty_common::dup): Ditto.
* tty.h (tty::open_input_mutex): New function.
* tty.cc (tty::common_init): Create input mutex and event.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tty-slave-read.diff
Type: text/x-diff
Size: 11863 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20010228/4c2645b7/attachment.bin>
More information about the Cygwin-patches
mailing list