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:
parent
ce4a32091a
commit
3aa2ffab12
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user