- return !pthread_create(tid, NULL, (void *(*)(void *))func, arg);
+ bool result;
+
+ sigset_t old, block;
+ sigfillset(&block);
+ pthread_sigmask(SIG_SETMASK, &block, &old);
+ result = pthread_create(tid, NULL, (void *(*)(void *))func, arg);
+ pthread_sigmask(SIG_SETMASK, &old, NULL);
+ return !result;