Skip to content

Commit 5c02677

Browse files
committed
Fix bug for test.sh; related to #116
1 parent a121ae0 commit 5c02677

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@ NGINX_CONFIG_OPT="--prefix=${NGINX_INSTALL_DIR} --with-http_stub_status_module"
1515
if [ "$NUM_THREADS_ENV" != "" ]; then
1616
NUM_THREADS=$NUM_THREADS_ENV
1717
else
18-
NUM_THREADS=$(expr `getconf _NPROCESSORS_ONLN` / 2)
19-
if [ $NUM_THREADS -eq "0" ]; then
18+
NUM_PROCESSORS=`getconf _NPROCESSORS_ONLN`
19+
if [ $NUM_PROCESSORS -gt 1 ]; then
20+
NUM_THREADS=$(expr $NUM_PROCESSORS / 2)
21+
else
2022
NUM_THREADS=1
2123
fi
2224
fi

0 commit comments

Comments
 (0)