pthread_sigmask: fix bug on FreeBSD 9
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 15 Jul 2012 18:06:11 +0000 (11:06 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 15 Jul 2012 18:06:30 +0000 (11:06 -0700)
commitfc5b3a7190a490a169f2d53a54b393a68fab9ec2
tree0abd1c4ad1dead56dfd15efcdca9ef43c0497dcf
parent9bb1d38cbb0513c45aee354f9e62eddc7be2fb77
pthread_sigmask: fix bug on FreeBSD 9

* lib/pthread_sigmask.c [PTHREAD_SIGMASK_INEFFECTIVE]:
Include string.h.
(pthread_sigmask) [PTHREAD_SIGMASK_INEFFECTIVE]:
When calling pthread_sigmask (1729, NEW, OLD), specify non-null NEW;
this avoids a bug on FreeBSD 9, where pthread_sigmask is effective
but pthread_sigmask (1729, NULL, NULL) returns zero.
See <http://bugs.gnu.org/11884>.
Avoid the need to call pthread_sigmask (1729, ...) in most cases,
by inspecting whether the main call changed the old mask.
ChangeLog
lib/pthread_sigmask.c