# Flags section
##############################################################################
-if which getconf > /dev/null && getconf _NPROCESSORS_ONLN > /dev/null; then
+if which getconf > /dev/null && getconf _NPROCESSORS_ONLN 2&>1 > /dev/null; then
CPUS=$(getconf _NPROCESSORS_ONLN)
-elif which sysctl > /dev/null && sysctl hw.ncpu > /dev/null; then
+elif which sysctl > /dev/null && sysctl hw.ncpu 2&>1 > /dev/null; then
CPUS=$(sysctl hw.ncpu | sed -E -e 's/^hw\.ncpu(: | = )//')
else
CPUS=1