summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/fhandler_tty.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2013-06-08 14:38:20 +0000
committerChristopher Faylor <me@cgf.cx>2013-06-08 14:38:20 +0000
commit5d35299e5102d92a995cf5aabd0fafa5b96a2c90 (patch)
tree56ada404b775552c88ade4f86a1a2349bd8a3310 /winsup/cygwin/fhandler_tty.cc
parentebf488e1abc9737ae4aca292509f5824aa00080a (diff)
downloadcygnal-5d35299e5102d92a995cf5aabd0fafa5b96a2c90.tar.gz
cygnal-5d35299e5102d92a995cf5aabd0fafa5b96a2c90.tar.bz2
cygnal-5d35299e5102d92a995cf5aabd0fafa5b96a2c90.zip
* cygwait.cc (cygwait): Remove lock around sig retrieval since this code is
essentially guarded by thread-specific signal_arrived. * exceptions.cc (_cygtls::handle_SIGCONT): Simplify. Eliminate lock/unlock since code is guarded by signal_arrived.
Diffstat (limited to 'winsup/cygwin/fhandler_tty.cc')
-rw-r--r--winsup/cygwin/fhandler_tty.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc
index 34c879503..5efbf4328 100644
--- a/winsup/cygwin/fhandler_tty.cc
+++ b/winsup/cygwin/fhandler_tty.cc
@@ -96,7 +96,7 @@ fhandler_pty_common::__acquire_output_mutex (const char *fn, int ln,
{
if (strace.active ())
strace.prntf (_STRACE_TERMIOS, fn, "(%d): pty output_mutex (%p): waiting %d ms", ln, output_mutex, ms);
- if (ms == INFINITE)
+ if (0 && ms == INFINITE)
ms = 100;
DWORD res = WaitForSingleObject (output_mutex, ms);
if (res == WAIT_OBJECT_0)
@@ -145,6 +145,9 @@ fhandler_pty_common::__release_output_mutex (const char *fn, int ln)
void
fhandler_pty_master::doecho (const void *str, DWORD len)
{
+ static char buf[128 * 1024];
+ int buflen = process_slave_output (buf, sizeof (buf), false);
+ puts_readahead (buf, buflen);
acquire_output_mutex (INFINITE);
if (!WriteFile (to_master, str, len, &len, NULL))
termios_printf ("Write to %p failed, %E", to_master);