(pthread_sigmask): Return correct value in case of an error.