Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ubus cli should handle SIGPIPE #1

Open
StefanTT opened this issue Feb 11, 2024 · 0 comments
Open

ubus cli should handle SIGPIPE #1

StefanTT opened this issue Feb 11, 2024 · 0 comments

Comments

@StefanTT
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant