Prevent the background test components from waiting forever for the following PV process to start.

This commit is contained in:
Andrew Wood
2024-12-15 15:00:51 +00:00
parent 25eaa2661a
commit f3e98da13b
7 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -37,7 +37,7 @@ fi
seq 1 100 > "${workFile1}"
true > "${workFile3}"
# shellcheck disable=SC2030
(while ! test -s "${workFile3}"; do sleep 0.1; done; sleep 1; read -r line; sleep 1; read -r line; sleep 1) <"${workFile1}" &
(while test -e "${workFile3}" && ! test -s "${workFile3}"; do sleep 0.1; done; sleep 1; read -r line; sleep 1; read -r line; sleep 1) <"${workFile1}" &
pid=$!
sleep 0.1
{ runWithValgrind -P "${workFile3}" -d "${pid}:0" -f -i 0.5 >/dev/null 2>&1; } 4>&1 || exit 1
@@ -48,7 +48,7 @@ seq 1 300 > "${workFile2}"
true > "${workFile3}"
# shellcheck disable=SC2030
(
while ! test -s "${workFile3}"; do sleep 0.1; done
while test -e "${workFile3}" && ! test -s "${workFile3}"; do sleep 0.1; done
sleep 1
read -r line
exec 9<"${workFile2}"