mirror of
https://github.com/google/gops.git
synced 2025-07-16 00:14:17 +02:00
ignore system process
This commit is contained in:
4
main.go
4
main.go
@ -67,6 +67,10 @@ func processes() {
|
|||||||
}
|
}
|
||||||
var undetermined int
|
var undetermined int
|
||||||
for _, pr := range pss {
|
for _, pr := range pss {
|
||||||
|
if pr.Pid() == 0 {
|
||||||
|
// ignore system process
|
||||||
|
continue
|
||||||
|
}
|
||||||
name, err := pr.Path()
|
name, err := pr.Path()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
undetermined++
|
undetermined++
|
||||||
|
Reference in New Issue
Block a user