Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Jul 2012 18:01:28 +0000 (UTC)
From:      "George V. Neville-Neil" <gnn@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r238743 - head/cddl/contrib/opensolaris/cmd/dtrace
Message-ID:  <201207241801.q6OI1SPS057812@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gnn
Date: Tue Jul 24 18:01:28 2012
New Revision: 238743
URL: http://svn.freebsd.org/changeset/base/238743

Log:
  Fix a bug in interrupt handling so that we're only considered
  impatient if we sent more than 2 INT signals.  This fixes a bug where
  we wouldn't see aggregations print on the command line if we Ctrl-C'd
  a dtrace script or command line invocation.
  
  MFC after:	2 weeks

Modified:
  head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c

Modified: head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c
==============================================================================
--- head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c	Tue Jul 24 16:29:33 2012	(r238742)
+++ head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c	Tue Jul 24 18:01:28 2012	(r238743)
@@ -70,6 +70,8 @@ typedef struct dtrace_cmd {
 #define	E_ERROR		1
 #define	E_USAGE		2
 
+#define IMPATIENT_LIMIT	2
+
 static const char DTRACE_OPTSTR[] =
 	"3:6:aAb:Bc:CD:ef:FGhHi:I:lL:m:n:o:p:P:qs:SU:vVwx:X:Z";
 
@@ -1202,7 +1204,7 @@ intr(int signo)
 	if (!g_intr)
 		g_newline = 1;
 
-	if (g_intr++)
+	if (g_intr++ > IMPATIENT_LIMIT)
 		g_impatient = 1;
 }
 



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