fix(playable): close release validation lifecycle gaps

This commit is contained in:
shen
2026-09-11 21:23:44 +08:00
parent f39a55fdd5
commit cc5573ddc1
13 changed files with 230 additions and 7 deletions
+4 -1
View File
@@ -31,6 +31,7 @@ allow_gameplay=0
required_arch="${MT_PLAYABLE_REQUIRED_ARCH:-arm64}"
godot_bin="${MT_GODOT:-godot}"
kill_grace_seconds=10
source script/playable_process_cleanup.sh
usage() {
cat <<'EOF'
@@ -162,7 +163,6 @@ stop_proxy() {
proxy_pid=""
fi
}
trap stop_proxy EXIT
if [ "$fault_status" = "confirmed" ]; then
# Loopback proxy in front of the test server for this client only. server.* points at it, so
# playable exit runs sharing the scenario go through it too; only the soak client requests faults.
@@ -255,6 +255,7 @@ while kill -0 "$child_pid" 2>/dev/null; do
done
wait "$child_pid"
process_code=$?
child_pid=""
# The redactor ends at EOF; bound the wait in case a grandchild kept the FIFO open.
redactor_wait=0
while kill -0 "$redactor_pid" 2>/dev/null && [ "$redactor_wait" -lt 10 ]; do
@@ -267,6 +268,7 @@ if kill -0 "$redactor_pid" 2>/dev/null; then
fi
wait "$redactor_pid"
redactor_code=$?
redactor_pid=""
rm -f "$fifo"
if [ -n "$sampler_pid" ]; then
# The sampler stops by itself once the child is gone; bound the wait anyway.
@@ -277,6 +279,7 @@ if [ -n "$sampler_pid" ]; then
done
if kill -0 "$sampler_pid" 2>/dev/null; then kill -TERM "$sampler_pid" 2>/dev/null; fi
wait "$sampler_pid"
sampler_pid=""
fi
stop_proxy