summaryrefslogtreecommitdiff
path: root/scope.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2012-07-20 23:00:33 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2012-10-02 22:16:08 -0700
commit41692eb416df3bff1e5a10b8c71058248c5d9308 (patch)
tree234f1056800fe4dbddcb750adc137e2e63f86445 /scope.c
parent519488decdfe224c79e7f2f18e36d2ecae2166a2 (diff)
downloadxscope-41692eb416df3bff1e5a10b8c71058248c5d9308.tar.gz
Add -I command line flag to enter interactive mode at startup
Avoids having to try to time a ^C after the signal handler is set up but before any data is handled. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'scope.c')
-rw-r--r--scope.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/scope.c b/scope.c
index 96f0464..89049aa 100644
--- a/scope.c
+++ b/scope.c
@@ -666,6 +666,7 @@ Usage(void)
" [-a<n>] -- audio verbose output\n"
" [-q] -- quiet output\n"
" [-D<debug-level>]\n"
+ " [-I] -- start in interactive mode\n"
" [-S<n>] -- start/stop on SIGUSR1\n"
" [-t] -- terminate when all clients close\n");
exit(1);
@@ -715,6 +716,10 @@ ScanArgs(int argc, char **argv)
debug(1, (stderr, "debuglevel = %d\n", debuglevel));
break;
+ case 'I':
+ Interrupt = 1;
+ break;
+
case 'S':
HandleSIGUSR1 = 1;
ScopeEnabled = atoi(++*argv);