Skip to content

ubus cli should handle SIGPIPE #1

Description

@StefanTT

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions