1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

Check SIG_HOLD action ealier to avoid missing test it in later code.

This commit is contained in:
David Xu 2003-04-12 00:38:47 +00:00
parent 7d40314e32
commit 5312b1c7fa
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=113375

View File

@ -1639,7 +1639,13 @@ tdsignal(struct thread *td, int sig)
}
SIGADDSET(*siglist, sig);
signotify(td); /* uses schedlock */
/*
* Defer further processing for signals which are held,
* except that stopped processes must be continued by SIGCONT.
*/
if (action == SIG_HOLD &&
!((prop & SA_CONT) && (p->p_flag & P_STOPPED_SIG)))
return;
/*
* Some signals have a process-wide effect and a per-thread
* component. Most processing occurs when the process next
@ -1817,14 +1823,6 @@ tdsigwakeup(struct thread *td, int sig, sig_t action)
td->td_priority = PUSER;
}
}
/*
* Defer further processing for signals which are held,
* except that stopped processes must be continued by SIGCONT.
*/
if (action == SIG_HOLD) {
return;
}
if (TD_IS_SLEEPING(td)) {
/*
* If thread is sleeping uninterruptibly