Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
This commit is contained in:
Konstantin Belousov 2017-10-16 20:11:29 +00:00
parent fc1e29dc35
commit 0167b33b81

View File

@ -2786,15 +2786,15 @@ issignal(struct thread *td)
struct sigacts *ps;
struct sigqueue *queue;
sigset_t sigpending;
int sig, prop;
ksiginfo_t ksi;
int prop, sig, traced;
p = td->td_proc;
ps = p->p_sigacts;
mtx_assert(&ps->ps_mtx, MA_OWNED);
PROC_LOCK_ASSERT(p, MA_OWNED);
for (;;) {
int traced = (p->p_flag & P_TRACED) || (p->p_stops & S_SIG);
traced = (p->p_flag & P_TRACED) || (p->p_stops & S_SIG);
sigpending = td->td_sigqueue.sq_signals;
SIGSETOR(sigpending, p->p_sigqueue.sq_signals);
@ -2982,11 +2982,10 @@ thread_stopped(struct proc *p)
* from the current set of pending signals.
*/
int
postsig(sig)
int sig;
postsig(int sig)
{
struct thread *td = curthread;
struct proc *p = td->td_proc;
struct thread *td;
struct proc *p;
struct sigacts *ps;
sig_t action;
ksiginfo_t ksi;
@ -2994,6 +2993,8 @@ postsig(sig)
KASSERT(sig != 0, ("postsig"));
td = curthread;
p = td->td_proc;
PROC_LOCK_ASSERT(p, MA_OWNED);
ps = p->p_sigacts;
mtx_assert(&ps->ps_mtx, MA_OWNED);
@ -3010,7 +3011,7 @@ postsig(sig)
ktrpsig(sig, action, td->td_pflags & TDP_OLDMASK ?
&td->td_oldsigmask : &td->td_sigmask, ksi.ksi_code);
#endif
if (p->p_stops & S_SIG) {
if ((p->p_stops & S_SIG) != 0) {
mtx_unlock(&ps->ps_mtx);
stopevent(p, S_SIG, sig);
mtx_lock(&ps->ps_mtx);