mirror of
https://github.com/shirou/gopsutil.git
synced 2025-04-28 13:48:49 +08:00
[net]linux: return err.
This commit is contained in:
parent
53dcbf48b4
commit
09e9859714
@ -416,7 +416,7 @@ func getProcInodes(root string, pid int32, max int) (map[string][]inodeMap, erro
|
|||||||
dir := fmt.Sprintf("%s/%d/fd", root, pid)
|
dir := fmt.Sprintf("%s/%d/fd", root, pid)
|
||||||
f, err := os.Open(dir)
|
f, err := os.Open(dir)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return ret, nil
|
return ret, err
|
||||||
}
|
}
|
||||||
defer f.Close()
|
defer f.Close()
|
||||||
files, err := f.Readdir(max)
|
files, err := f.Readdir(max)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user