ubus cli should handle SIGPIPE
StefanTT opened this issue · 0 comments
StefanTT commented
I am writing a script that uses ubus subscriptions for presence detection. When the wifi network changes I need to restart the subscriptions in order to subscribe to the changed networks. This is not the bug, just so that you understand what my use case is.
This should terminate as soon as it receives the first event, right?
ubus subscribe hostapd hostapd.wifi | while read -r line; do
break
done
Spoiler: it does not terminate.
To be sure the problem is ubus
and not something else: this terminates as expected:
cat /dev/urandom | while read -r line; do
break
done