commit 782e22177f7f630c27fc88115abe7b959ef94bd7 parent 30208f8d05e307de27804c88bd83ec47e8c560e4 Author: Christian Grothoff <grothoff@gnunet.org> Date: Sun, 14 Jan 2024 17:27:35 +0100 Fix child starting Diffstat:
| M | contrib/taler-mdb-network-check.sh | | | 13 | ++++++++----- |
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/contrib/taler-mdb-network-check.sh b/contrib/taler-mdb-network-check.sh @@ -168,14 +168,17 @@ function check_network() show_failure backend-auth-failure return fi - echo "Network OK, starting child" - if [ "${CHILD_PID}" = "-1" ] + if [ "$CHILD_PID" != "-1" ] then - # shellcheck disable=SC2068 - $@ & - CHILD_PID=$! + kill -TERM "$CHILD_PID" + wait + CHILD_PID="-1" fi + echo "Network OK, starting child" + # shellcheck disable=SC2068 + $@ & + CHILD_PID=$! }