Skip to content
Snippets Groups Projects
Commit 4febf8a2 authored by Robert Martin-Legene's avatar Robert Martin-Legene
Browse files

Let's see if this won't help us dying nicely inside a docker

parent 620308f8
No related branches found
No related tags found
No related merge requests found
......@@ -13,6 +13,7 @@ trap "exit 1" ERR
trap "reaper" SIGINT SIGCHLD
unset LOGDIR LOGPIPE PIDIDX
declare -A PIDIDX
trap "killallprocs" SIGTERM
function reaper()
{
......@@ -40,6 +41,15 @@ function reaper()
max=30
}
function killallprocs()
{
if [ ${#PIDIDX[*]} -gt 0 ]
then
echo "*** Killing all remaining processes: ${PIDIDX[*]} (${!PIDIDX[*]})."
kill -KILL ${!PIDIDX[*]} 2>/dev/null || true
fi
}
# You can start as:
# BFAHOME=/home/bfa/bfa singlestart.sh
# singlestart.sh /home/bfa/bfa
......@@ -111,8 +121,4 @@ do
sleep 1
max=$(( $max - 1 ))
done
if [ ${#PIDIDX[*]} -gt 0 ]
then
echo "*** Killing all remaining processes: ${PIDIDX[*]} (${!PIDIDX[*]})."
kill -KILL ${!PIDIDX[*]} 2>/dev/null || true
fi
killallprocs
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment