Para quem encontrar este post mais tarde na vida .... Aqui está a solução que funcionou para mim com base na resposta do m0dular acima. m0dular na verdade merece o crédito.
#!/bin/bash
.....
# Intialize the Child Process List (array)
CPLIST=()
# Max concurrent child processes
MAXCP=6
# Worker loop to spawn and monitor child (worker) processes
while [[ SOME-CONDITION ]]
do
# Monitor Child Process List (array)
# Ensure that we don't exceed Max Child Processes
if [[ ${#CPLIST[@]} -gt $MAXCP ]]
then
while [[ ${#CPLIST[@]} -gt $MAXCP ]]
do
sleep 1
# Check each child processes to see if it's still running.
for idx in ${!CPLIST[@]}
do
# Is child process still alive?
kill -0 ${CPLIST[$idx]} 2>/dev/null
if [[ $? -gt 0 ]]
then
# Child process is no longer running.
# Remove it from the child process list (array).
unset CPLIST[$idx]
fi # if $?
done # for idx
done # while MAXCP
fi # if MAXCP
# Spawn a child process
./MyProgram &
# Append Child Process PID to Child Process List
CPLIST=(${CPLIST[@]} $!)
done # while
.....
# (end of file)