ktrace: Log the code for all signals (PSIG events).
The code provides information on how the signal was generated. Formerly, the code was only logged for traps, much like only signal handlers for traps received a meaningful si_code before FreeBSD 7.0. In rare cases, no information is available and 0 is still logged. MFC after: 1 week
This commit is contained in:
parent
8e82d541da
commit
6100955206
@ -1262,7 +1262,7 @@ kern_sigtimedwait(struct thread *td, sigset_t waitset, ksiginfo_t *ksi,
|
||||
mtx_lock(&ps->ps_mtx);
|
||||
action = ps->ps_sigact[_SIG_IDX(sig)];
|
||||
mtx_unlock(&ps->ps_mtx);
|
||||
ktrpsig(sig, action, &td->td_sigmask, 0);
|
||||
ktrpsig(sig, action, &td->td_sigmask, ksi->ksi_code);
|
||||
}
|
||||
#endif
|
||||
if (sig == SIGKILL)
|
||||
@ -2716,7 +2716,7 @@ postsig(sig)
|
||||
#ifdef KTRACE
|
||||
if (KTRPOINT(td, KTR_PSIG))
|
||||
ktrpsig(sig, action, td->td_pflags & TDP_OLDMASK ?
|
||||
&td->td_oldsigmask : &td->td_sigmask, 0);
|
||||
&td->td_oldsigmask : &td->td_sigmask, ksi.ksi_code);
|
||||
#endif
|
||||
if (p->p_stops & S_SIG) {
|
||||
mtx_unlock(&ps->ps_mtx);
|
||||
|
Loading…
x
Reference in New Issue
Block a user