From 93a4d9d97c367be5dae1ed6ccaa78c184f3a090b Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 28 Jan 2011 11:17:29 +0000 Subject: [PATCH] * fhandler_socket.cc (fhandler_socket::wait_for_events): Call pthread_testcancel in case of timeout to enable pthread_cancel on waiting thread. --- winsup/cygwin/ChangeLog | 6 ++++++ winsup/cygwin/fhandler_socket.cc | 2 ++ 2 files changed, 8 insertions(+) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 3f9ff8bf6..ec8896338 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,9 @@ +2011-01-28 Corinna Vinschen + + * fhandler_socket.cc (fhandler_socket::wait_for_events): Call + pthread_testcancel in case of timeout to enable pthread_cancel + on waiting thread. + 2011-01-27 Corinna Vinschen * include/features.h (__STDC_ISO_10646__): Move to newlib's diff --git a/winsup/cygwin/fhandler_socket.cc b/winsup/cygwin/fhandler_socket.cc index 85651c500..b8dc02748 100644 --- a/winsup/cygwin/fhandler_socket.cc +++ b/winsup/cygwin/fhandler_socket.cc @@ -626,6 +626,8 @@ fhandler_socket::wait_for_events (const long event_mask, const DWORD flags) switch (WSAWaitForMultipleEvents (2, ev, FALSE, 50, FALSE)) { case WSA_WAIT_TIMEOUT: + pthread_testcancel (); + /*FALLTHRU*/ case WSA_WAIT_EVENT_0: break;