X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=src%2Fthread%2Fpthread_setcanceltype.c;h=ce2fff073569085862ae5825a01dc480e16a7659;hp=7eb543a8961e63a0eddff2b128d0229b179d3dfa;hb=72768ea99e67162b7b42d9cd8917cf9a2c00f1f1;hpb=ebf82447be4b30bedc19ad868c3a0662b1ba596d 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; }