From 32346689cc15bb36a47039a185d521d8f3f9f339 Mon Sep 17 00:00:00 2001 From: Ole Tange Date: Wed, 2 Mar 2016 20:59:19 +0100 Subject: [PATCH] tracefile -p fix. --- tracefile/tracefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tracefile/tracefile b/tracefile/tracefile index ea2e49a..ae1f986 100755 --- a/tracefile/tracefile +++ b/tracefile/tracefile @@ -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() { if(/chdir."(([^\\"]|\\[\\"nt])*)".\s*=\s*0/) { $dir = $1; @@ -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, ); }