I\'m having trouble understanding the startup commands for the services in this docker-compose.yml. The two relevant lines from the .yml are:
command: \"/bin/sh
The only reason I see:
If you killall -INT sleep
, this won't affect main script.
Try this:
while true ;do sleep 12; echo yes;done
Then send a Interrupt
signal:
killall -INT sleep
This will break the job!
Try now
while true ;do sleep 12 & wait $! ; echo yes;done
Then again:
killall -INT sleep
Job won't break!
Sample output, hitting killall -INT sleep
from another window:
user@myhost:~$ while true ;do sleep 12; echo yes;done
break
user@myhost:~$ while true ;do sleep 12 & wait $! ; echo yes;done
[1] 30632
[1]+ Interrupt sleep 12
yes
[1] 30636
[1]+ Interrupt sleep 12
yes
[1] 30638
[1]+ Interrupt sleep 12
yes
[1] 30640