about summary refs log tree commit diff
path: root/linuxthreads
diff options
context:
space:
mode:
Diffstat (limited to 'linuxthreads')
-rw-r--r--linuxthreads/ChangeLog6
-rw-r--r--linuxthreads/cancel.c1
2 files changed, 7 insertions, 0 deletions
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog
index 52230cd76f..830784194b 100644
--- a/linuxthreads/ChangeLog
+++ b/linuxthreads/ChangeLog
@@ -1,3 +1,9 @@
+2000-11-06  Ulrich Drepper  <drepper@redhat.com>
+
+	* cancel.c (pthread_cancel): Always set p_canceled, even if we are
+	not doing it right now.
+	Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
+
 2000-10-30  Ulrich Drepper  <drepper@redhat.com>
 
 	* Examples/ex4.c (main): Don't use exit() to avoid warning with
diff --git a/linuxthreads/cancel.c b/linuxthreads/cancel.c
index 370a373c77..40f9db5302 100644
--- a/linuxthreads/cancel.c
+++ b/linuxthreads/cancel.c
@@ -65,6 +65,7 @@ int pthread_cancel(pthread_t thread)
   th = handle->h_descr;
 
   if (th->p_cancelstate == PTHREAD_CANCEL_DISABLE || th->p_canceled) {
+    th->p_canceled = 1;
     __pthread_unlock(&handle->h_lock);
     return 0;
   }