From c890767bc6455cbd3786544543e169a069ed80cf Mon Sep 17 00:00:00 2001 From: Matthias Frei Date: Thu, 23 Nov 2023 11:01:12 +0100 Subject: [PATCH] scion.sh: block for child processes at shutdown (#4445) The `supervisorctl shutdown` command does not block for the supervisor or its child processes to terminate. This can occasionally lead to situations where SCION processes were still running after the `scion.sh stop` command returned. In the CI system, which immediately proceeds to bundle up the log files, this led to `tar` reporting an error that the log file was still being written to. Fixed by invoking `supervisorctl stop all`, which does block, to terminate all child processes before `shutdown`. --- scion.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scion.sh b/scion.sh index 7343c35d0a..0f4851be1e 100755 --- a/scion.sh +++ b/scion.sh @@ -113,7 +113,8 @@ stop_scion() { if is_docker_be; then ./tools/quiet ./tools/dc down else - ./tools/quiet tools/supervisor.sh shutdown + ./tools/quiet tools/supervisor.sh stop all # blocks until child processes are stopped + ./tools/quiet tools/supervisor.sh shutdown # shutdown does not block, but as children are already stopped, actual shutdown will be prompt too. run_teardown fi }