From 06378d6db64b46a00bd57e9112a90fb92e2f0ba2 Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Sun, 12 May 2019 20:34:22 -0700 Subject: [PATCH] Refine killNode logging --- ci/localnet-sanity.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ci/localnet-sanity.sh b/ci/localnet-sanity.sh index 654d5437e..0603e94ce 100755 --- a/ci/localnet-sanity.sh +++ b/ci/localnet-sanity.sh @@ -169,13 +169,11 @@ startNodes() { killNode() { declare pid=$1 - echo "kill $pid" set +e if kill "$pid"; then + echo "Waiting for $pid to exit..." wait "$pid" - else - echo "^^^ +++" - echo "Warning: unable to kill $pid" + echo "$pid exited with $?" fi set -e } @@ -199,10 +197,11 @@ killNodes() { # Give the nodes a splash of time to cleanly exit before killing them sleep 2 - echo "--- Killing nodes" + echo "--- Killing nodes: ${pids[*]}" for pid in "${pids[@]}"; do killNode "$pid" done + echo "done killing nodes" pids=() }