X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fpthread_sigmask.c;h=349f7ad5c26bb8aa39f37f749278cee020a92670;hb=a046525c54d375ff2b3d9d0f8c78f5c779ce4f99;hp=06ee7fc42042bf09d061db6c2caa76e593ad6225;hpb=43243b5fdcf1e0c0e016cabe190f1ab29b984871;p=gnulib.git diff --git a/lib/pthread_sigmask.c b/lib/pthread_sigmask.c index 06ee7fc42..349f7ad5c 100644 --- a/lib/pthread_sigmask.c +++ b/lib/pthread_sigmask.c @@ -47,6 +47,16 @@ pthread_sigmask (int how, const sigset_t *new_mask, sigset_t *old_mask) if (ret == -1) return errno; # endif +# if PTHREAD_SIGMASK_UNBLOCK_BUG + if (ret == 0 + && new_mask != NULL + && (how == SIG_UNBLOCK || how == SIG_SETMASK)) + { + /* Give the OS the opportunity to raise signals that were pending before + the pthread_sigmask call and have now been unblocked. */ + usleep (1); + } +# endif return ret; #else int ret = sigprocmask (how, new_mask, old_mask);