Fix parallel mode deadlock when MAX_JOBS > number of sources.

This commit is contained in:
Darko Poljak 2018-01-30 09:48:43 +01:00
parent bd0fe05003
commit fc0b86005c

View file

@ -455,9 +455,14 @@ if [ "${PARALLEL}" ]; then
trap "${TRAPFUNC}" 0 1 2 15
# determine how much parallel jobs to prestart
if [ "${MAX_JOBS}" ] && [ "${MAX_JOBS}" -le "${no_sources}" ]
if [ "${MAX_JOBS}" ]
then
if [ "${MAX_JOBS}" -le "${no_sources}" ]
then
prestart="${MAX_JOBS}"
else
prestart="${no_sources}"
fi
else
prestart=0
fi