From owner-svn-src-head@FreeBSD.ORG Tue Jul 24 18:01:28 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D4790106564A; Tue, 24 Jul 2012 18:01:28 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BF2F28FC12; Tue, 24 Jul 2012 18:01:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6OI1SJU057814; Tue, 24 Jul 2012 18:01:28 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6OI1SPS057812; Tue, 24 Jul 2012 18:01:28 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201207241801.q6OI1SPS057812@svn.freebsd.org> From: "George V. Neville-Neil" Date: Tue, 24 Jul 2012 18:01:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238743 - head/cddl/contrib/opensolaris/cmd/dtrace X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jul 2012 18:01:29 -0000 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; }