Re: sdnotify-wrapper but the other way around

From: Jan Braun <janbraun_at_gmx.de>
Date: Tue, 4 Mar 2025 12:30:30 +0100

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

This archive was generated by hypermail 2.4.0 : Tue Mar 04 2025 - 12:31:12 CET