summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/thread.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/thread.cc')
-rw-r--r--winsup/cygwin/thread.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/winsup/cygwin/thread.cc b/winsup/cygwin/thread.cc
index af0d6afc7..1bea526bf 100644
--- a/winsup/cygwin/thread.cc
+++ b/winsup/cygwin/thread.cc
@@ -1057,6 +1057,9 @@ pthread::pop_cleanup_handler (int const execute)
mutex.lock ();
+ /* We will no honor cancels since the thread is exiting. */
+ cancelstate = PTHREAD_CANCEL_DISABLE;
+
if (cleanup_stack != NULL)
{
__pthread_cleanup_handler *handler = cleanup_stack;