* 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.
This commit is contained in:
@ -127,6 +127,8 @@ get_inet_addr (const struct sockaddr *in, int inlen,
|
||||
some greedy Win32 application. Therefore we should never wait
|
||||
endlessly without checking for signals and thread cancel event. */
|
||||
pthread_testcancel ();
|
||||
/* Using IsEventSignalled like this is racy since another thread could
|
||||
be waiting for signal_arrived. */
|
||||
if (IsEventSignalled (signal_arrived)
|
||||
&& !_my_tls.call_signal_handler ())
|
||||
{
|
||||
|
Reference in New Issue
Block a user