summaryrefslogtreecommitdiff
path: root/src/thread
diff options
context:
space:
mode:
Diffstat (limited to 'src/thread')
-rw-r--r--src/thread/pthread_setcanceltype.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/thread/pthread_setcanceltype.c b/src/thread/pthread_setcanceltype.c
index 7eb543a8..ce2fff07 100644
--- a/src/thread/pthread_setcanceltype.c
+++ b/src/thread/pthread_setcanceltype.c
@@ -6,5 +6,6 @@ int pthread_setcanceltype(int new, int *old)
if (new > 1U) return EINVAL;
if (old) *old = self->cancelasync;
self->cancelasync = new;
+ if (new) pthread_testcancel();
return 0;
}