mirror of
https://github.com/shirou/gopsutil.git
synced 2025-04-26 13:48:59 +08:00
Merge pull request #458 from danielnelson/skip-not-exist
[net] linux: skip if not exist error on getProcInodesAll
This commit is contained in:
commit
384a55110a
@ -541,8 +541,8 @@ func getProcInodesAll(root string, max int) (map[string][]inodeMap, error) {
|
||||
for _, pid := range pids {
|
||||
t, err := getProcInodes(root, pid, max)
|
||||
if err != nil {
|
||||
// skip if permission error
|
||||
if os.IsPermission(err) {
|
||||
// skip if permission error or no longer exists
|
||||
if os.IsPermission(err) || os.IsNotExist(err) {
|
||||
continue
|
||||
}
|
||||
return ret, err
|
||||
|
Loading…
x
Reference in New Issue
Block a user