We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a121ae0 commit 5c02677Copy full SHA for 5c02677
test.sh
@@ -15,8 +15,10 @@ NGINX_CONFIG_OPT="--prefix=${NGINX_INSTALL_DIR} --with-http_stub_status_module"
15
if [ "$NUM_THREADS_ENV" != "" ]; then
16
NUM_THREADS=$NUM_THREADS_ENV
17
else
18
- NUM_THREADS=$(expr `getconf _NPROCESSORS_ONLN` / 2)
19
- if [ $NUM_THREADS -eq "0" ]; then
+ NUM_PROCESSORS=`getconf _NPROCESSORS_ONLN`
+ if [ $NUM_PROCESSORS -gt 1 ]; then
20
+ NUM_THREADS=$(expr $NUM_PROCESSORS / 2)
21
+ else
22
NUM_THREADS=1
23
fi
24
0 commit comments