Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Apr 2011 14:38:11 +0000 (UTC)
From:      Jilles Tjoelker <jilles@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r220740 - head/sys/kern
Message-ID:  <201104171438.p3HEcB0J040745@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jilles
Date: Sun Apr 17 14:38:11 2011
New Revision: 220740
URL: http://svn.freebsd.org/changeset/base/220740

Log:
  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

Modified:
  head/sys/kern/kern_sig.c

Modified: head/sys/kern/kern_sig.c
==============================================================================
--- head/sys/kern/kern_sig.c	Sun Apr 17 14:10:12 2011	(r220739)
+++ head/sys/kern/kern_sig.c	Sun Apr 17 14:38:11 2011	(r220740)
@@ -1262,7 +1262,7 @@ kern_sigtimedwait(struct thread *td, sig
 			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);



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