From 9b045dac024af82f02a15bc5efc9638cb9c11263 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 8 Nov 2016 21:55:55 +1030 Subject: [PATCH] test: shutdown harder. Sometimes bitcoind takes a while to shutdown. Just kill it. Signed-off-by: Rusty Russell --- daemon/test/scripts/shutdown.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/daemon/test/scripts/shutdown.sh b/daemon/test/scripts/shutdown.sh index 9d8a210fe..c39fba9a4 100755 --- a/daemon/test/scripts/shutdown.sh +++ b/daemon/test/scripts/shutdown.sh @@ -2,5 +2,10 @@ . `dirname $0`/vars.sh +[ ! -f $DATADIR/regtest/bitcoind.pid ] || BITCOIN_PID=`cat $DATADIR/regtest/bitcoind.pid` + $CLI stop sleep 1 # Make sure socket is closed. + +# Now make sure it's dead. +if [ -n "$BITCOIN_PID" ]; then kill -9 $BITCOIN_PID 2>/dev/null || true; fi