Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2011-12-04 21:58:24 +0400
committerChristopher Faylor <me@cgf.cx>2011-12-04 21:58:24 +0400
commit8f937028d9b8d387cf35b64d92056241bffabd78 (patch)
tree2ed73616733809fc902b1e33bc2370a0468ba142 /winsup/cygwin/fhandler_console.cc
parent69864e48cb0ef1efd1ac29a80b34bbc9c604533b (diff)
* exceptions.cc (exception::handle): Drop abbreviation for "exception" since I
never remember what it stands for. (sig_handle_tty_stop): Remove obsolete call to sig_handle_tty_stop. (_cygtls::call_signal_handler): Rework to grab signal information from _main_tls if none is set for _my_tls. Try harder to keep thread locked. (reset_signal_arrived): Delete. * fhandler.cc (fhandler_base_overlapped::wait_overlapped): Use new cygWFMO call to wait for an event + standard cygwin stuff. Modify debug output to acccomodate new function. * fhandler_console.cc (fhandler_console::read): Replace WaitForMultipleObjects with cygWFMO. * fhandler_socket.cc (get_inet_addr): Add comment. * gendef (_sigdelayed): Remove call to reset_signal_arrived. * sigproc.cc (_cygtls::signal_exit): Don't close my_readsig here unless we're in the signal thread. (create_signal_arrived): Create signal_arrived as auto-reset so that only one thread is woken when a signal arrives. * sigproc.h (cygWFMO): New function. (reset_signal_arrived): Delete declaration.
Diffstat (limited to 'winsup/cygwin/fhandler_console.cc')
-rw-r--r--winsup/cygwin/fhandler_console.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc
index 0e9717bd1..e8a8d6a08 100644
--- a/winsup/cygwin/fhandler_console.cc
+++ b/winsup/cygwin/fhandler_console.cc
@@ -333,8 +333,6 @@ fhandler_console::read (void *pv, size_t& buflen)
return;
}
- HANDLE w4[3] = { h, signal_arrived, pthread::get_cancel_event () };
- DWORD nwait = w4[2] ? 3 : 2;
DWORD timeout = is_nonblocking () ? 0 : INFINITE;
char tmp[60];
@@ -350,7 +348,7 @@ fhandler_console::read (void *pv, size_t& buflen)
set_cursor_maybe (); /* to make cursor appear on the screen immediately */
restart:
- switch (WaitForMultipleObjects (nwait, w4, FALSE, timeout))
+ switch (cygWFMO (1, timeout, h))
{
case WAIT_OBJECT_0:
break;