diff options
author | Takashi Yano <takashi.yano@nifty.ne.jp> | 2015-03-25 20:42:38 +0900 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2015-04-23 21:57:07 +0200 |
commit | 8c1a778e7ddf137420de2407a96977f3281c3775 (patch) | |
tree | c35486a94f7038eab6e5823637465bb35906a4c6 /winsup/cygwin/tty.cc | |
parent | 4f3f09ad7238b6afb8d4052fec65d3ee1572f615 (diff) | |
download | cygnal-8c1a778e7ddf137420de2407a96977f3281c3775.tar.gz cygnal-8c1a778e7ddf137420de2407a96977f3281c3775.tar.bz2 cygnal-8c1a778e7ddf137420de2407a96977f3281c3775.zip |
TIOCPKT mode of PTY is broken if ONLCR bit is cleared.
* tty.h (class tty_min): Remove variable "write_error" to which any
errors are not currently set at anywhere.
(class tty): Add variable "column" for handling ONOCR.
* tty.cc (tty::init): Add initialization code for variable "column".
* fhandler.h (class fhandler_pty_master): Remove variable "need_nl"
which is not necessary any more. "need_nl" was needed by OPOST process
in fhandler_pty_master::process_slave_output().
(class fhandler_pty_common): Add function process_opost_output() for
handling post processing for OPOST in write process.
* fhandler_tty.cc (fhandler_pty_master::process_slave_output): Count
TIOCPKT control byte into length to be read in TIOCPKT mode. Move
post processing for OPOST to write process. Remove code related to
variable "write_error". Return with EIO error if slave is already
closed.
(fhandler_pty_master::fhandler_pty_master): Remove initialization
code for variable "need_nl".
(fhandler_pty_common::process_opost_output): Add this function for
handling of OPOST in write process. Add code to avoid blocking in
non-blocking mode when output is suspended by ^S.
(fhandler_pty_slave::write): Call fhandler_pty_common::
process_opost_output() instead of WriteFile(). Remove code related to
variable "write_error".
(fhandler_pty_master::doecho): Call fhandler_pty_common::
process_opost_output() instead of WriteFile().
* select.cc (peek_pipe): Remove code related to variable "need_nl".
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup/cygwin/tty.cc')
-rw-r--r-- | winsup/cygwin/tty.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/winsup/cygwin/tty.cc b/winsup/cygwin/tty.cc index 01c53f933..7de0fa91c 100644 --- a/winsup/cygwin/tty.cc +++ b/winsup/cygwin/tty.cc @@ -237,6 +237,7 @@ tty::init () was_opened = false; master_pid = 0; is_console = false; + column = 0; } HANDLE |