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

Be more exact with sigaction SA_SIGINFO handling.

Reviewed by:	marcel
This commit is contained in:
David E. O'Brien 2007-12-18 20:39:13 +00:00
parent 0decbf9db9
commit 10c2b8e128
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=174756

View File

@ -662,7 +662,6 @@ kern_sigaction(td, sig, act, oact, flags)
ps = p->p_sigacts;
mtx_lock(&ps->ps_mtx);
if (oact) {
oact->sa_handler = ps->ps_sigact[_SIG_IDX(sig)];
oact->sa_mask = ps->ps_catchmask[_SIG_IDX(sig)];
oact->sa_flags = 0;
if (SIGISMEMBER(ps->ps_sigonstack, sig))
@ -673,8 +672,12 @@ kern_sigaction(td, sig, act, oact, flags)
oact->sa_flags |= SA_RESETHAND;
if (SIGISMEMBER(ps->ps_signodefer, sig))
oact->sa_flags |= SA_NODEFER;
if (SIGISMEMBER(ps->ps_siginfo, sig))
if (SIGISMEMBER(ps->ps_siginfo, sig)) {
oact->sa_flags |= SA_SIGINFO;
oact->sa_sigaction =
(__siginfohandler_t *)ps->ps_sigact[_SIG_IDX(sig)];
} else
oact->sa_handler = ps->ps_sigact[_SIG_IDX(sig)];
if (sig == SIGCHLD && ps->ps_flag & PS_NOCLDSTOP)
oact->sa_flags |= SA_NOCLDSTOP;
if (sig == SIGCHLD && ps->ps_flag & PS_NOCLDWAIT)