- if (catch) {
- if (SHOULDissignal(p,ut)) {
- if (sig = CURSIG(p)) {
- if (clear_wait(self, THREAD_INTERRUPTED) == KERN_FAILURE)
- goto block;
- /* if SIGTTOU or SIGTTIN then block till SIGCONT */
- if ((pri & PTTYBLOCK) && ((sig == SIGTTOU) || (sig == SIGTTIN))) {
- p->p_flag |= P_TTYSLEEP;
- /* reset signal bits */
- clear_procsiglist(p, sig);
- assert_wait(&p->p_siglist, THREAD_ABORTSAFE);
- /* assert wait can block and SIGCONT should be checked */
- if (p->p_flag & P_TTYSLEEP) {
- thread_block(THREAD_CONTINUE_NULL);
-
- if (mtx && !dropmutex)
- lck_mtx_lock(mtx);
- }