Fix parallel mode deadlock when MAX_JOBS > number of sources.
This commit is contained in:
parent
bd0fe05003
commit
fc0b86005c
1 changed files with 7 additions and 2 deletions
9
ccollect
9
ccollect
|
@ -455,9 +455,14 @@ if [ "${PARALLEL}" ]; then
|
||||||
trap "${TRAPFUNC}" 0 1 2 15
|
trap "${TRAPFUNC}" 0 1 2 15
|
||||||
|
|
||||||
# determine how much parallel jobs to prestart
|
# determine how much parallel jobs to prestart
|
||||||
if [ "${MAX_JOBS}" ] && [ "${MAX_JOBS}" -le "${no_sources}" ]
|
if [ "${MAX_JOBS}" ]
|
||||||
then
|
then
|
||||||
prestart="${MAX_JOBS}"
|
if [ "${MAX_JOBS}" -le "${no_sources}" ]
|
||||||
|
then
|
||||||
|
prestart="${MAX_JOBS}"
|
||||||
|
else
|
||||||
|
prestart="${no_sources}"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
prestart=0
|
prestart=0
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue