Added true fallback to num_cpu_cores SunOS case

This commit is contained in:
Kjetil Limkjær 2017-12-15 09:19:15 +01:00
parent 5149c53165
commit dc145fa5a2

View file

@ -156,7 +156,7 @@ num_cpu_cores() {
num="$(sysctl -n hw.ncpu 2>/dev/null || true)" num="$(sysctl -n hw.ncpu 2>/dev/null || true)"
;; ;;
SunOS ) SunOS )
num="$(getconf NPROCESSORS_ONLN 2>/dev/null)" num="$(getconf NPROCESSORS_ONLN 2>/dev/null || true)"
;; ;;
* ) * )
num="$({ getconf _NPROCESSORS_ONLN || num="$({ getconf _NPROCESSORS_ONLN ||