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

Conversation

nmeum
Copy link
Contributor

@nmeum nmeum commented Mar 3, 2022

The MQTT mosquitto library ignores SIGPIPE on purpose to "prevent
unnecessary client quits in threaded mode":

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

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
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

Successfully merging this pull request may close these issues.

None yet

2 participants