From 1dbba9424484b23516f040b24152c503cc79a49a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophane=20Hufschmitt?= <7226587+thufschmitt@users.noreply.github.com> Date: Fri, 26 Jan 2024 16:49:07 +0100 Subject: [PATCH] Make sure that `pdiGcDaemon` is the right pid Move its definition before a loop that might change `$!` --- tests/functional/common/vars-and-functions.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/functional/common/vars-and-functions.sh.in b/tests/functional/common/vars-and-functions.sh.in index 5dfeb64da..646ae516e 100644 --- a/tests/functional/common/vars-and-functions.sh.in +++ b/tests/functional/common/vars-and-functions.sh.in @@ -163,11 +163,11 @@ startGcDaemon() { -s "$NIX_STORE_DIR" \ > /dev/null 2>&1 \ & + pidGcDaemon=$! for ((i = 0; i < 30; i++)); do if [[ -S $NIX_GC_SOCKET_PATH ]]; then break; fi sleep 1 done - pidGcDaemon=$! trapFunctions[killGcDaemon]=killGcDaemon }