aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/thread.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2012-05-12 20:26:43 +0000
committerChristopher Faylor <me@cgf.cx>2012-05-12 20:26:43 +0000
commit1f99484812718c083450dafcd25b249a238e8f5a (patch)
tree2e50e148c386372ecd57ea82b109c21b599aacf8 /winsup/cygwin/thread.cc
parent348b56b5a34e2037b98c30f229b16d1a7468a921 (diff)
downloadnewlib-1f99484812718c083450dafcd25b249a238e8f5a.zip
newlib-1f99484812718c083450dafcd25b249a238e8f5a.tar.gz
newlib-1f99484812718c083450dafcd25b249a238e8f5a.tar.bz2
* DevNotes: Add entry cgf-000006.
* thread.cc (pthread::pop_cleanup_handler): Set cancel state to disabled to avoid recursively waiting for cancel.
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 af0d6af..1bea526 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;