I notice that if I do this in one (interactive) shell $ for n in 1 2 3 4 5; do /bin/sleep 60; echo $n; done
and then 'kill -STOP' the sleep process (from another window), that bash will proceed to run the next loop iteration. That is, it echos '1' and starts a new /bin/sleep, even while the first one is sitting there stopped. (This doesn't appear to be specific to 'sleep'--an example with 'dd' also does the same thing.) It seems to me that this loop should just wait until the process is 'kill -CONT'ed and keep right on going as if nothing had happened. Is there any reason not to do this? Mike