[lkml]   [2014]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[BUG] perf record: does not propagate command error code

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"

That's wrong!

But perf stat:

$ perf stat -e cycles false && echo "yes" || echo "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?


 \ /
  Last update: 2014-04-08 21:01    [W:0.088 / U:7.720 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site