1
0
mirror of https://github.com/shirou/gopsutil.git synced 2025-04-26 13:48:59 +08:00

[process] linux: fix NumFD type inconversion.

This commit is contained in:
Shirou WAKAYAMA 2017-08-04 03:09:34 +00:00
parent ce4a32091a
commit 3aa2ffab12

View File

@ -219,8 +219,8 @@ func (p *Process) NumCtxSwitches() (*NumCtxSwitchesStat, error) {
// NumFDs returns the number of File Descriptors used by the process.
func (p *Process) NumFDs() (int32, error) {
numFds, _, err := p.fillFromfdList()
return numFds, err
_, fnames, err := p.fillFromfdList()
return int32(len(fnames)), err
}
// NumThreads returns the number of threads used by the process.