perf tools: Make stat/record print fatal signals of the target program
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / tools / perf / builtin-stat.c
index b5673194870a9dbef9dd40572f43deeb9bfa326f..7ce65f52415e0799f060d35d67290fac196dfb12 100644 (file)
@@ -495,6 +495,8 @@ static int run_perf_stat(int argc __used, const char **argv)
        if (forks) {
                close(go_pipe[1]);
                wait(&status);
+               if (WIFSIGNALED(status))
+                       psignal(WTERMSIG(status), argv[0]);
        } else {
                while(!done) sleep(1);
        }