perf record: auto detect when stdout is a pipe
authorFranck Bui-Huu <fbuihuu@gmail.com>
Sun, 16 Jan 2011 16:14:45 +0000 (17:14 +0100)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 24 Jan 2011 12:58:27 +0000 (10:58 -0200)
commitd7065adb9b4f3384c2615f0a3dbdb6c3aae1eb18
tree2547ed90722723a9039bbbc3d4f1519d4908db79
parente80711ca8512c8586da0c3e18e2f1caf73c88731
perf record: auto detect when stdout is a pipe

This patch gives the ability to 'perf record' to detect when its stdout
has been redirected to a pipe. There's now no more need to add '-o -'
switch in this case.

However '-o <path>' option has always precedence, that is if specified
and stdout has been connected via a pipe then the output will go into
the specified output.

LKML-Reference: <m3ipxo966i.fsf@gmail.com>
Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-record.c