wait_for_bead: fix pipe subshell exit leaving 9p read orphaned

Use process substitution instead of pipe so exit 0 terminates the
script and its file descriptor, killing the 9p read process cleanly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Levi Neely 2026-03-14 20:39:13 +01:00
parent c3b3d1fd87
commit a3ccdf4e52
1 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ fi
EXPECTED_SOURCE="beads/$MOUNT"
9p read anvillm/events | while IFS= read -r line; do
while IFS= read -r line; do
type=$(echo "$line" | jq -r '.type // empty' 2>/dev/null)
[ "$type" = "BeadReady" ] || continue
@ -43,4 +43,4 @@ EXPECTED_SOURCE="beads/$MOUNT"
# Emit full bead data and exit
echo "$line" | jq '.data'
exit 0
done
done < <(9p read anvillm/events)