[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bash treats SIGSTOP in child process as child termination?
From: |
Mike Coleman |
Subject: |
bash treats SIGSTOP in child process as child termination? |
Date: |
Tue, 4 Aug 2009 12:12:46 -0500 |
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
- bash treats SIGSTOP in child process as child termination?,
Mike Coleman <=