diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 1a4f738a0..a4662592e 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,9 @@ +2012-10-15 Christopher Faylor + + * fhandler_tty.cc (fhandler_pty_slave::write): Fix potential exit from + loop with write mutex held. Delete redundant mutex release. Clear tty + error once we've grabbed it. + 2012-10-15 Corinna Vinschen * fhandler_raw.cc (fhandler_dev_raw::fhandler_dev_raw): Drop gratuitous diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 954fd6622..6bb389f38 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -663,6 +663,8 @@ fhandler_pty_slave::write (const void *ptr, size_t len) { set_errno (get_ttyp ()->write_error); towrite = (DWORD) -1; + get_ttyp ()->write_error = 0; + release_output_mutex (); break; } @@ -681,7 +683,6 @@ fhandler_pty_slave::write (const void *ptr, size_t len) } raise (SIGHUP); /* FIXME: Should this be SIGTTOU? */ towrite = (DWORD) -1; - release_output_mutex (); break; } } diff --git a/winsup/cygwin/release/1.7.17 b/winsup/cygwin/release/1.7.17 index ce2f2a0aa..885680035 100644 --- a/winsup/cygwin/release/1.7.17 +++ b/winsup/cygwin/release/1.7.17 @@ -1,6 +1,9 @@ Bug fixes: ---------- +- Prevent CTRL-S hang. + Fixes: http://cygwin.com/ml/cygwin/2012-10/threads.html#00089 + - Revamp signals so that signals-to-threads more closely mimic Linux operation. First step of fix for: http://cygwin.com/ml/cygwin/2012-05/msg00186.html