Skip to content

Commit

Permalink
Merge pull request shirou#880 from Lomanic/issue867
Browse files Browse the repository at this point in the history
[process][darwin][nocgo] Fix shirou#867 iterate on every lines returned by lsof to handle potential warnings
  • Loading branch information
Lomanic authored May 31, 2020
2 parents 42aec72 + 8f96911 commit a303ddc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion process/process_darwin_nocgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func (p *Process) ExeWithContext(ctx context.Context) (string, error) {
}
txtFound := 0
lines := strings.Split(string(out), "\n")
for i := 1; i < len(lines); i += 2 {
for i := 1; i < len(lines); i++ {
if lines[i] == "ftxt" {
txtFound++
if txtFound == 2 {
Expand Down

0 comments on commit a303ddc

Please sign in to comment.