This commit is contained in:
Heavybullets8 2022-07-25 23:44:09 -06:00
parent a498bfe6cd
commit 5889438cbd

View File

@ -12,9 +12,10 @@ it=0
while [[ $it -lt ${#array[@]} ]] while [[ $it -lt ${#array[@]} ]]
do do
proc_count=${#processes[@]} proc_count=${#processes[@]}
count=0
for proc in "${processes[@]}" for proc in "${processes[@]}"
do do
kill -0 "$proc" &> /dev/null || ((proc_count--)) kill -0 "$proc" &> /dev/null || { ((proc_count--)) ; unset "processes[$count]" ;}
done done
#jobs=$(jobs -p | wc -l) #jobs=$(jobs -p | wc -l)
if [[ "$proc_count" -ge "$update_limit" ]]; then if [[ "$proc_count" -ge "$update_limit" ]]; then