tracefile: Output from cmd on stdout can mess up output from strace.
This commit is contained in:
parent
cbaa61fd78
commit
4c0e59272a
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue