Wait after processes are launched to poll to see whether they have exited (#5686)

This commit is contained in:
Ben Wells 2018-01-12 21:32:18 +00:00 committed by Misty Stanley-Jones
parent 9c8a0ffb37
commit cb3f9aced6
1 changed files with 1 additions and 2 deletions

View File

@ -58,7 +58,7 @@ this in a few different ways.
# if it detects that either of the processes has exited.
# Otherwise it will loop forever, waking up every 60 seconds
while /bin/true; do
while sleep 60; do
ps aux |grep my_first_process |grep -q -v grep
PROCESS_1_STATUS=$?
ps aux |grep my_second_process |grep -q -v grep
@ -69,7 +69,6 @@ this in a few different ways.
echo "One of the processes has already exited."
exit -1
fi
sleep 60
done
```