perf tools: Use same signal handling strategy as 'record'
tip-bot for Arnaldo Carvalho de Melo
merge botCommit-ID: 9daddf66a37708ec7182a7058f159166d12c9812 Gitweb: http://git.kernel.org/tip/9daddf66a37708ec7182a7058f159166d12c9812 Author: Arnaldo Carvalho de Melo <[email protected]> AuthorDate: Fri, 11 Dec 2015 16:43:57 -0300 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Mon, 14 Dec 2015 12:08:55 -0300
perf tools: Use same signal handling strategy as 'record'
I.e. don't exit with the signal number, instead set the signal handler to the default one and then raise it again.
Noticed while trying to dump the stack at segfaults in the 'perf test' forked process used to run each test, that inspects signal info at each test.
Cc Adrian Hunter <[email protected]>
Cc David Ahern <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Wang Nan <[email protected]>
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
--- tools/perf/util/util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tools/perf/util/util.c +2 -1
@@ -352,7 +352,8 @@ void sighandler_dump_stack(int sig) {psignal (sig,"perf" );dump_stack (); -exit (sig); +signal (sig,SIG_DFL ); +raise (sig); }int parse_nsec_time (const char *str,u64 *ptime)