From 1718fa1f1794b461902187705f3411c51677aac3 Mon Sep 17 00:00:00 2001 From: David Ahern Date: Sun, 26 Aug 2012 12:24:44 -0600 Subject: [PATCH] --- yaml --- r: 323751 b: refs/heads/master c: fceda7feb4a7822feee9662bc64968230d8f37bf h: refs/heads/master i: 323749: d602415e5fd3d2d36e28b73e748eb81ff437e039 323747: 759bc9321aff5a4fd8dfa3a91065b950a491ce5e 323743: 3356d7f226cfb203139a5431e68bdada84d314f5 v: v3 --- [refs] | 2 +- trunk/tools/perf/builtin-stat.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 287b74ff74be..b5609ac06a60 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 33d6aef5136075930f7e9a05175bf4f772d8428e +refs/heads/master: fceda7feb4a7822feee9662bc64968230d8f37bf diff --git a/trunk/tools/perf/builtin-stat.c b/trunk/tools/perf/builtin-stat.c index d53d8ab099b1..02f49eba677f 100644 --- a/trunk/tools/perf/builtin-stat.c +++ b/trunk/tools/perf/builtin-stat.c @@ -428,7 +428,7 @@ static int run_perf_stat(int argc __used, const char **argv) if (forks && (pipe(child_ready_pipe) < 0 || pipe(go_pipe) < 0)) { perror("failed to create pipes"); - exit(1); + return -1; } if (forks) { @@ -510,7 +510,8 @@ static int run_perf_stat(int argc __used, const char **argv) } if (child_pid != -1) kill(child_pid, SIGTERM); - die("Not all events could be opened.\n"); + + pr_err("Not all events could be opened.\n"); return -1; } counter->supported = true; @@ -1189,7 +1190,7 @@ int cmd_stat(int argc, const char **argv, const char *prefix __used) output = fopen(output_name, mode); if (!output) { perror("failed to create output file"); - exit(-1); + return -1; } clock_gettime(CLOCK_REALTIME, &tm); fprintf(output, "# started on %s\n", ctime(&tm.tv_sec));