Skip to content

Commit

Permalink
should use strings.Contains(string(cmdline), process) instead (#5102)
Browse files Browse the repository at this point in the history
  • Loading branch information
wgliang authored and tsg committed Sep 8, 2017
1 parent ac9561d commit 01841ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packetbeat/procs/procs.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ func findPidsByCmdlineGrep(prefix string, process string) ([]int, error) {
continue
}

if strings.Index(string(cmdline), process) >= 0 {
if strings.Contains(string(cmdline), process) {
pids = append(pids, pid)
}
}
Expand Down

0 comments on commit 01841ce

Please sign in to comment.