From 3aa2ffab12a1852644f6d33cd782f877272bf305 Mon Sep 17 00:00:00 2001 From: Shirou WAKAYAMA Date: Fri, 4 Aug 2017 03:09:34 +0000 Subject: [PATCH] [process] linux: fix NumFD type inconversion. --- process/process_linux.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/process/process_linux.go b/process/process_linux.go index af44dfe..b090dd9 100644 --- a/process/process_linux.go +++ b/process/process_linux.go @@ -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.