diff --git a/common/common_unix.go b/common/common_unix.go index 21aaa1e..d0557ad 100644 --- a/common/common_unix.go +++ b/common/common_unix.go @@ -22,9 +22,9 @@ func CallLsof(invoke Invoker, pid int32, args ...string) ([]string, error) { } out, err := invoke.Command(lsof, cmd...) if err != nil { - // if no pid found, lsof returnes code 1 but have output. + // if no pid found, lsof returnes code 1. if err.Error() == "exit status 1" && len(out) == 0 { - return []string{}, err + return []string{}, nil } } lines := strings.Split(string(out), "\n")