[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABPqkBQeAqRUW8LLMsHhHBR8gJcE4VPZa++ji8i=RKUCd2jSvQ@mail.gmail.com>
Date: Tue, 8 Apr 2014 11:17:07 -0700
From: Stephane Eranian <eranian@...gle.com>
To: LKML <linux-kernel@...r.kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@...hat.com>,
Jiri Olsa <jolsa@...hat.com>,
Namhyung Kim <namhyung@...nel.org>,
"mingo@...e.hu" <mingo@...e.hu>,
Peter Zijlstra <peterz@...radead.org>
Subject: [BUG] perf record: does not propagate command error code
Hi,
There is a discrepancy in the way perf stat and perf record propagate
command error code back when they launch a process:
$ perf record -e cycles false && echo "yes" || echo "no"
yes
That's wrong!
But perf stat:
$ perf stat -e cycles false && echo "yes" || echo "no"
no
That's correct!
You want the error to be propagated back because it helps
catch errors in monitoring scripts.
I looked at the perf record code handling the error from the child.
It is complicated and uses atexit() to cleanup the child. It is hard
to get the child exit status back. I wonder why this was handled
that way.
Anybody has a fix for this?
Thanks
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists