Revert the handling of all siginfo sa_flags except SA_SIGINFO to the
pre-r270321. Namely, the flags are preserved for SIG_DFL and SIG_IGN dispositions. Requested and reviewed by: jilles Sponsored by: The FreeBSD Foundation MFC after: 1 week
This commit is contained in:
parent
7e1770a7bb
commit
c83655f334
@ -625,9 +625,14 @@ static bool
|
||||
sigact_flag_test(struct sigaction *act, int flag)
|
||||
{
|
||||
|
||||
return ((act->sa_flags & flag) != 0 &&
|
||||
(__sighandler_t *)act->sa_sigaction != SIG_IGN &&
|
||||
(__sighandler_t *)act->sa_sigaction != SIG_DFL);
|
||||
/*
|
||||
* SA_SIGINFO is reset when signal disposition is set to
|
||||
* ignore or default. Other flags are kept according to user
|
||||
* settings.
|
||||
*/
|
||||
return ((act->sa_flags & flag) != 0 && (flag != SA_SIGINFO ||
|
||||
((__sighandler_t *)act->sa_sigaction != SIG_IGN &&
|
||||
(__sighandler_t *)act->sa_sigaction != SIG_DFL)));
|
||||
}
|
||||
|
||||
/*
|
||||
@ -916,7 +921,6 @@ siginit(p)
|
||||
for (i = 1; i <= NSIG; i++) {
|
||||
if (sigprop(i) & SA_IGNORE && i != SIGCONT) {
|
||||
SIGADDSET(ps->ps_sigignore, i);
|
||||
SIGADDSET(ps->ps_sigintr, i);
|
||||
}
|
||||
}
|
||||
mtx_unlock(&ps->ps_mtx);
|
||||
@ -936,10 +940,6 @@ sigdflt(struct sigacts *ps, int sig)
|
||||
SIGADDSET(ps->ps_sigignore, sig);
|
||||
ps->ps_sigact[_SIG_IDX(sig)] = SIG_DFL;
|
||||
SIGDELSET(ps->ps_siginfo, sig);
|
||||
SIGADDSET(ps->ps_sigintr, sig);
|
||||
SIGDELSET(ps->ps_sigonstack, sig);
|
||||
SIGDELSET(ps->ps_sigreset, sig);
|
||||
SIGDELSET(ps->ps_signodefer, sig);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user