Jan Braun schrob:
> | timeout 1234 socat "unix-recvfrom:$NOTIFY_SOCKET,unlink-early" "system:paste >&3" &
> [...]
> The paste(1) is there to actually create the newline.
And since by now we've strayed far from "just reuse the newline", we
might as well parse all notifications and react only to READY=1, it's no
big difference anymore:
| timeout 1234 socat \
| "unix-recvfrom:$NOTIFY_SOCKET,unlink-early,fork" \
| 'shell:if grep -x READY=1 >&3 ; then kill $SOCAT_PPID ; fi' \
| &
HTH,
Jan
Received on Tue Mar 04 2025 - 12:30:30 CET