Hold the proc lock while accessing p_procsig in trapsignal().

This commit is contained in:
Tim J. Robbins 2003-03-09 01:40:55 +00:00
parent 4ebd61a3cf
commit ef3dab76bf

View File

@ -1268,9 +1268,10 @@ trapsignal(p, sig, code)
register int sig;
u_long code;
{
register struct sigacts *ps = p->p_sigacts;
register struct sigacts *ps;
PROC_LOCK(p);
ps = p->p_sigacts;
if ((p->p_flag & P_TRACED) == 0 && SIGISMEMBER(p->p_sigcatch, sig) &&
!SIGISMEMBER(p->p_sigmask, sig)) {
p->p_stats->p_ru.ru_nsignals++;