FreeBSD/lib/libthr/thread/thr_sig.c
/*
 * Cancellation behavior:
 *   Thread may be canceled at start, if thread got signal,
 *   it is not canceled.
 */
Cancellation behavior:
Thread may be canceled at start, if thread got signal,
it is not canceled.
Cancellation behavior : Thread may be canceled at start if thread got signal it is not canceled .
int
__thr_sigwait(const sigset_t *set, int *sig)
{
	struct pthread	*curthread = _get_curthread();
	sigset_t newset;
	int ret;
	do {
		_thr_cancel_enter(curthread);
		ret = __sys_sigwait(thr_remove_thr_signals(set, &newset), sig);
		_thr_cancel_leave(curthread, (ret != 0));
	} while (ret == EINTR);
	return (ret);
}
int __thr_sigwait ( const sigset_t * set , int * sig ) { struct pthread * curthread = _get_curthread ( ) ; sigset_t newset ; int ret ; do { _thr_cancel_enter ( curthread ) ; ret = __sys_sigwait ( thr_remove_thr_signals ( set , & newset ) , sig ) ; _thr_cancel_leave ( curthread , ( ret != 0 ) ) ; } while ( ret == EINTR ) ; return ( ret ) ; }
Cancellation behavior:
   Thread may be canceled at start, if thread got signal,
   it is not canceled.
Cancellation behavior : Thread may be canceled at start if thread got signal it is not canceled .