Merge pull request #731 from traetox/master

Fixes issue #730
pull/733/head
shirou 6 years ago committed by GitHub
commit 2bcfa5e074
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -43,7 +43,15 @@ func NumProcs() (uint64, error) {
if err != nil {
return 0, err
}
return uint64(len(list)), err
var cnt uint64
for _, v := range list {
if _, err = strconv.ParseUint(v, 10, 64); err == nil {
cnt++
}
}
return cnt, nil
}
// cachedBootTime must be accessed via atomic.Load/StoreUint64

Loading…
Cancel
Save