summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/select.cc
diff options
context:
space:
mode:
authorTakashi Yano <takashi.yano@nifty.ne.jp>2015-03-25 20:42:38 +0900
committerCorinna Vinschen <corinna@vinschen.de>2015-04-23 21:57:07 +0200
commit8c1a778e7ddf137420de2407a96977f3281c3775 (patch)
treec35486a94f7038eab6e5823637465bb35906a4c6 /winsup/cygwin/select.cc
parent4f3f09ad7238b6afb8d4052fec65d3ee1572f615 (diff)
downloadcygnal-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/select.cc')
-rw-r--r--winsup/cygwin/select.cc5
1 files changed, 0 insertions, 5 deletions
diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc
index 17a32a367..1706c87c8 100644
--- a/winsup/cygwin/select.cc
+++ b/winsup/cygwin/select.cc
@@ -604,11 +604,6 @@ peek_pipe (select_record *s, bool from_select)
{
fhandler_pty_master *fhm = (fhandler_pty_master *) fh;
fhm->flush_to_slave ();
- if (fhm->need_nl)
- {
- gotone = s->read_ready = true;
- goto out;
- }
}
break;
default: