diff options
author | jilles <jilles@FreeBSD.org> | 2011-04-17 14:38:11 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2011-04-17 14:38:11 +0000 |
commit | a860eeb5befe892b95e27dbfcc74a02953a95b7a (patch) | |
tree | 4aa72aa5a021e1e40ca0f7dc830f998403322957 | |
parent | 2599955582c659accd7a26bb402ceeb685910940 (diff) | |
download | FreeBSD-src-a860eeb5befe892b95e27dbfcc74a02953a95b7a.zip FreeBSD-src-a860eeb5befe892b95e27dbfcc74a02953a95b7a.tar.gz |
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
-rw-r--r-- | sys/kern/kern_sig.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 9c30dc2..d5b49da 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -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); |