set pthread sigmask to be the same as sigprocmask

it seems that on linux child threads of the main thread
will either inherit the process signal mask or that the
main thread's signal mask is set to be the same as the
process signal mask. either way, on osx the signal mask
of the main thread does not follow the process signal mask,
thus we have to set the pthread signal mask likewise
whenever we set the process signal mask.