Skip to content

Commit

Permalink
Fixes issue shirou#730
Browse files Browse the repository at this point in the history
  • Loading branch information
kris-watts-gravwell committed Jul 26, 2019
1 parent 1917a27 commit c372000
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion internal/common/common_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c372000

Please sign in to comment.