mirror of
https://github.com/pyenv/pyenv.git
synced 2024-12-22 18:33:28 +00:00
Add SunOS case statement to num_cpu_cores
This commit is contained in:
parent
c5e4bab858
commit
5149c53165
1 changed files with 4 additions and 1 deletions
|
@ -155,8 +155,11 @@ num_cpu_cores() {
|
|||
Darwin | *BSD )
|
||||
num="$(sysctl -n hw.ncpu 2>/dev/null || true)"
|
||||
;;
|
||||
SunOS )
|
||||
num="$(getconf NPROCESSORS_ONLN 2>/dev/null)"
|
||||
;;
|
||||
* )
|
||||
num="$({ getconf _NPROCESSORS_ONLN || getconf NPROCESSORS_ONLN ||
|
||||
num="$({ getconf _NPROCESSORS_ONLN ||
|
||||
grep -c ^processor /proc/cpuinfo; } 2>/dev/null)"
|
||||
num="${num#0}"
|
||||
;;
|
||||
|
|
Loading…
Reference in a new issue