summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2023-04-03 11:40:33 -0700
committerArnaldo Carvalho de Melo <acme@redhat.com>2023-04-04 13:23:59 -0300
commit75a616c6d332342291c45b0381abe00bd597036c (patch)
tree7782cb5acaf8a71bbf6367c73d4f16ce760bcda4
parent2c4b928074839425b64155cb3f6d4e0e5e67e835 (diff)
downloadlinux-stable-75a616c6d332342291c45b0381abe00bd597036c.tar.gz
linux-stable-75a616c6d332342291c45b0381abe00bd597036c.tar.bz2
linux-stable-75a616c6d332342291c45b0381abe00bd597036c.zip
perf srcline: Avoid addr2line SIGPIPEs
Ignore SIGPIPEs when addr2line is configured. Signed-off-by: Ian Rogers <irogers@google.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Nathan Chancellor <nathan@kernel.org> Cc: Nick Desaulniers <ndesaulniers@google.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Tom Rix <trix@redhat.com> Cc: llvm@lists.linux.dev Link: https://lore.kernel.org/r/20230403184033.1836023-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r--tools/perf/util/srcline.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/srcline.c b/tools/perf/util/srcline.c
index f4fcdada821b..cfca03abd6f8 100644
--- a/tools/perf/util/srcline.c
+++ b/tools/perf/util/srcline.c
@@ -473,6 +473,8 @@ static enum a2l_style addr2line_configure(struct child_process *a2l)
ch = io__get_char(&io);
} while (ch > 0 && ch != '\n');
}
+ /* Ignore SIGPIPE in the event addr2line exits. */
+ signal(SIGPIPE, SIG_IGN);
}
return style;
}