]> git.baikalelectronics.ru Git - kernel.git/commit
perf tools: Make Ctrl-C stop processing on TUI
authorNamhyung Kim <namhyung@kernel.org>
Fri, 29 May 2015 12:53:44 +0000 (21:53 +0900)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 29 May 2015 15:49:00 +0000 (12:49 -0300)
commit7aa683af911ff30253f3afb3d80da313940ad511
tree754aa0939698ea7cc04587ee0b10be323fc9c64d
parentf2102f8b102434096156f62de1ffd7e4f5199aa8
perf tools: Make Ctrl-C stop processing on TUI

It was inconvenient that perf cannot be quit with SIGINT during
processing samples on TUI especially for large data files.

This was because the first argument of SLang_init_tty(), abort_char,
being 0.  The manual says it's the ascii value of the control character
that will be used to generate the interrupt signal [1].  Passing -1
means to use the default value (Ctrl-C).

However, after processing samples, Ctrl-C was used to in other cases as
well - like stepping back from annotate.  So recover the original
behavior after processing.

[1] http://jedsoft.org/slang/doc/html/cslang-6.html#ss6.1

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1432904024-13170-1-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/ui/browsers/annotate.c
tools/perf/ui/browsers/hists.c
tools/perf/ui/tui/setup.c