I don't know of one off hand, but you could do this with Bash without too much work. I would put each of the foo processes in a process group. You can then trap SIGINT in the parent and kill the process group with kill -pgid
(Negative before process group number). You can also launch them all as jobs. So they all run at once (Pretty much). Finally, you could loop over the ouput of jobs every x seconds (sleep in the loop) and get the count, if the count is less than the number of foo processes, than you can fire up another one (Could get more fancy by making sure none are stopped etc).
A rough Version might be something like:
#!/bin/bash
command=$1
n_job=$2
function kill_jobs {
echo traped
for job in $(jobs -p); do
echo killing $job
kill $job
done
}
trap 'kill_jobs; exit' SIGINT
while true; do
current_jobs=$(jobs -pr)
x=0;
for job in $current_jobs; do
(( x++ ))
done;
jobs_to_run=$(($n_job - $x))
for (( y = 0; y < $jobs_to_run; y++ )); do
$command &
done
x=0
sleep 5
done
You can also find similar sort of stuff in the "Proccesses and Concurrency" section of Pythton for Unix and Linux System Adminsitration.