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

Restore default SIGPIPE handler after fork() #7

Merged
merged 1 commit into from
Apr 7, 2022
Merged

Restore default SIGPIPE handler after fork() #7

merged 1 commit into from
Apr 7, 2022

Commits on Mar 3, 2022

  1. Restore default SIGPIPE handler after fork()

    The MQTT mosquitto library ignores SIGPIPE on purpose to "prevent
    unnecessary client quits in threaded mode":
    
    * https://github.com/eclipse/mosquitto/blob/d5970ca9985f4d3193fe7a359707723090bb13e9/lib/mosquitto.c#L112-L114
    * https://github.com/eclipse/mosquitto/blob/d5970ca9985f4d3193fe7a359707723090bb13e9/src/mosquitto.c#L413
    
    However, the default handler should be available to child processes
    spawned by mqtt-exec. Hence, we reset it after fork(). Otherwise, this
    causes issues when running test suites in Alpine.
    
    See https://gitlab.alpinelinux.org/alpine/aports/-/issues/13573
    nmeum committed Mar 3, 2022
    Configuration menu
    Copy the full SHA
    c58f6fd View commit details
    Browse the repository at this point in the history