Skip to content

Commit

Permalink
tracefile -p fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ole Tange committed Mar 2, 2016
1 parent 845ee0e commit 3234668
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tracefile/tracefile
Expand Up @@ -13,9 +13,9 @@ if(not ($opt::exists or $opt::nonexists or $opt::all)) {

my @cmd = shell_quote(@ARGV);
my $dir = ".";
my $pid = $opt::pid ? "-p $pid" : "";
my $pid = $opt::pid ? "-p $opt::pid" : "";

open(IN, "-|", "strace -ff -e trace=file @cmd 2>&1") || die;
open(IN, "-|", "strace -ff $pid -e trace=file @cmd") || die;
while(<IN>) {
if(/chdir."(([^\\"]|\\[\\"nt])*)".\s*=\s*0/) {
$dir = $1;
Expand Down Expand Up @@ -50,7 +50,7 @@ sub options_hash {
"exists|exist|e" => \$opt::exists,
"nonexists|nonexist|non-exists|non-exist|n" => \$opt::nonexists,
"all|a" => \$opt::all,
"pid|p=i" => $opt::pid,
"pid|p=i" => \$opt::pid,
);
}

Expand Down

0 comments on commit 3234668

Please sign in to comment.