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)
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

Simple merge