Commit 4c0e5927 authored by Ole Tange's avatar Ole Tange

tracefile: Output from cmd on stdout can mess up output from strace.

parent cbaa61fd
......@@ -256,7 +256,8 @@ my @cmd = shell_quote(@ARGV);
my $dir = ".";
my $pid = $opt::pid ? "-p $opt::pid" : "";
open(IN, "-|", "strace -ff $pid -e trace=file @cmd 2>&1") || die;
# BUG: If command gives output on stderr that can confuse the strace output
open(IN, "-|", "strace -ff $pid -e trace=file @cmd 2>&1 >/dev/null") || die;
while(<IN>) {
if(/chdir."(([^\\"]|\\[\\"nt])*)".\s*=\s*0/) {
$dir = $1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment