Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 May 2011 12:48:39 +0000 (UTC)
From:      Jilles Tjoelker <jilles@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r222125 - stable/8/sys/kern
Message-ID:  <201105201248.p4KCmdKW084678@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105201248.p4KCmdKW084678>