diff options
Diffstat (limited to 'nptl/sysdeps')
-rw-r--r-- | nptl/sysdeps/pthread/librt-cancellation.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/nptl/sysdeps/pthread/librt-cancellation.c b/nptl/sysdeps/pthread/librt-cancellation.c index ae9dd2ad97..753a2d831e 100644 --- a/nptl/sysdeps/pthread/librt-cancellation.c +++ b/nptl/sysdeps/pthread/librt-cancellation.c @@ -41,8 +41,9 @@ __librt_enable_asynccancel (void) if (__builtin_expect ((oldval & CANCELED_BITMASK) != 0, 0)) { - /* If we are already exiting stop right here. */ - if ((oldval & EXITING_BITMASK) != 0) + /* If we are already exiting or if PTHREAD_CANCEL_DISABLED, + stop right here. */ + if ((oldval & (EXITING_BITMASK | CANCELSTATE_BITMASK)) != 0) break; int curval = THREAD_ATOMIC_CMPXCHG_VAL (self, cancelhandling, |