> hmmm, or something along the lines of
 > 
 >     let n=0
 >     let lim=3
 >     while read task; do
 >         $task &
 >         if [[ $((++n)) -ge $lim ]]; then
 >             wait
 >             let n--
 >         fi
 >     done
 > 
 >     while [[ $((n--)) -gt 0 ]]; do
 >         wait
 >     done

D'oh!  I completely forgot about 'wait'.
I suppose when the manual says 'waits for all child processes'
it really means 'waits for any child to terminate' not 'waits for all
children to terminate', as in wait(2)?

Thanks!


Norman
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users

Reply via email to