diff options
author | George V. Neville-Neil <gnn@FreeBSD.org> | 2012-07-24 18:01:28 +0000 |
---|---|---|
committer | George V. Neville-Neil <gnn@FreeBSD.org> | 2012-07-24 18:01:28 +0000 |
commit | d83f1ab98e25a7c3ed7d43ac299ec6eb69eda754 (patch) | |
tree | f4dbbf4a0443cd9af67ecde362732a46014aa076 /cddl | |
parent | 52baf267be42c3e14a9d843c24c953efae7195bd (diff) | |
download | src-d83f1ab98e25a7c3ed7d43ac299ec6eb69eda754.tar.gz src-d83f1ab98e25a7c3ed7d43ac299ec6eb69eda754.zip |
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
Notes
Notes:
svn path=/head/; revision=238743
Diffstat (limited to 'cddl')
-rw-r--r-- | cddl/contrib/opensolaris/cmd/dtrace/dtrace.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c b/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c index a2766593607b..310d49b17ca7 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c +++ b/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c @@ -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; } |