svn commit: r222125 - stable/8/sys/kern

Jilles Tjoelker jilles at FreeBSD.org
Fri May 20 12:48:40 UTC 2011


Author: jilles
Date: Fri May 20 12:48:39 2011
New Revision: 222125
URL: http://svn.freebsd.org/changeset/base/222125

Log:
  MFC r220740: 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.

Modified:
  stable/8/sys/kern/kern_sig.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/kern/kern_sig.c
==============================================================================
--- stable/8/sys/kern/kern_sig.c	Fri May 20 12:41:33 2011	(r222124)
+++ stable/8/sys/kern/kern_sig.c	Fri May 20 12:48:39 2011	(r222125)
@@ -1290,7 +1290,7 @@ out:
 			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)
@@ -2750,7 +2750,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);


More information about the svn-src-all mailing list