Fix up signal handling
This commit is contained in:
parent
06cd7c1020
commit
a21251dfea
|
@ -380,6 +380,7 @@ kill_fullnode() {
|
||||||
kill "$_pid" || true
|
kill "$_pid" || true
|
||||||
wait "$_pid" || true
|
wait "$_pid" || true
|
||||||
fi
|
fi
|
||||||
|
exit
|
||||||
}
|
}
|
||||||
trap 'kill_fullnode' INT TERM ERR
|
trap 'kill_fullnode' INT TERM ERR
|
||||||
|
|
||||||
|
@ -498,8 +499,8 @@ EOF
|
||||||
secs_to_next_genesis_poll=5
|
secs_to_next_genesis_poll=5
|
||||||
secs_to_next_snapshot=30
|
secs_to_next_snapshot=30
|
||||||
while true; do
|
while true; do
|
||||||
if ! kill -0 "$pid"; then
|
if [[ -z $pid ]] || ! kill -0 "$pid"; then
|
||||||
wait "$pid" || true
|
[[ -z $pid ]] || wait "$pid"
|
||||||
echo "############## $node_type exited, restarting ##############"
|
echo "############## $node_type exited, restarting ##############"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue