Merge pull request #402 from chrisroberts/fix-exe-macos

Fix process.Exe() on macOS 10.12
This commit is contained in:
shirou 2017-07-26 22:28:07 +09:00 committed by GitHub
commit 1da5000996
1 changed files with 2 additions and 2 deletions

View File

@ -99,8 +99,8 @@ func (p *Process) Exe() (string, error) {
return "", err
}
lsof := exec.Command(lsof_bin, "-p", strconv.Itoa(int(p.Pid)), "-Fn")
awk := exec.Command(awk_bin, "NR==3{print}")
lsof := exec.Command(lsof_bin, "-p", strconv.Itoa(int(p.Pid)), "-Fpfn")
awk := exec.Command(awk_bin, "NR==5{print}")
sed := exec.Command(sed_bin, "s/n\\//\\//")
output, _, err := common.Pipeline(lsof, awk, sed)