From owner-svn-src-head@FreeBSD.ORG Tue Jul 24 21:10:48 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B52F71065678; Tue, 24 Jul 2012 21:10:48 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 6FCBE8FC1A; Tue, 24 Jul 2012 21:10:47 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id AAA07667; Wed, 25 Jul 2012 00:10:39 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1StmNL-00051m-GZ; Wed, 25 Jul 2012 00:10:39 +0300 Message-ID: <500F0F4D.2050409@FreeBSD.org> Date: Wed, 25 Jul 2012 00:10:37 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120620 Thunderbird/13.0.1 MIME-Version: 1.0 To: "George V. Neville-Neil" References: <201207241801.q6OI1SPS057812@svn.freebsd.org> In-Reply-To: <201207241801.q6OI1SPS057812@svn.freebsd.org> X-Enigmail-Version: 1.4.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: 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 21:10:48 -0000 on 24/07/2012 21:01 George V. Neville-Neil said the following: > 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. I'd rather fix the shell that sends 2 or 2+ SIGINTs on one Ctrl-C. [half-joking] I think that _a bug_ is there, not here. I do not experience any such problems with zsh. > 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; Because of the postfix ++ g_impatient will be set to one at the _forth_ run through this code (assuming that the initial value of g_intr is zero) contrary to what you say in the commit message. > } > > BTW, posting even trivial patches for a review as a part of the routine seems to be a good habit in general. -- Andriy Gapon