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
Please don't ignore SIGPIPE in the mosquitto client library #2564
Labels
Component: libmosquitto
Status: Completed
Nothing further to be done with this issue, it can be closed by the requestor or committer.
Type: Bug
Milestone
Comments
I can think of two alternatives here:
|
Agreed, this is bad behaviour. Thanks for pointing it out. |
ralight
added
Type: Bug
Component: libmosquitto
Status: Completed
Nothing further to be done with this issue, it can be closed by the requestor or committer.
labels
Aug 7, 2022
algitbot
pushed a commit
to alpinelinux/aports
that referenced
this issue
Aug 15, 2022
algitbot
pushed a commit
to alpinelinux/aports
that referenced
this issue
Aug 15, 2022
This has been fixed by mosquitto upstream. See: eclipse/mosquitto#2564 This reverts commit 1d5e4a4.
algitbot
pushed a commit
to alpinelinux/aports
that referenced
this issue
Oct 21, 2022
See eclipse/mosquitto#2564 (cherry picked from commit 9292d10)
algitbot
pushed a commit
to alpinelinux/aports
that referenced
this issue
Oct 21, 2022
See eclipse/mosquitto#2564 (cherry picked from commit 9292d10) (cherry picked from commit a83466b)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
Component: libmosquitto
Status: Completed
Nothing further to be done with this issue, it can be closed by the requestor or committer.
Type: Bug
Hello,
Presently, the mosquitto MQTT library ignores
SIGPIPE
:mosquitto/lib/mosquitto.c
Lines 112 to 114 in d5970ca
This is a problem since this will affect all threads of the process running the mosquitto client library. Furthermore, as per
signal(7)
“A child created via fork(2) inherits a copy of its parent's signal dispositions.”. That is, any process forked from the process which uses the mosquitto client library will also ignoreSIGPIPE
by default. I believe it to be a very bad idea to have a C library introduce this sort of side-effect since code using the C library may requireSIGPIPE
to not be ignored.We noticed this at Alpine Linux where we use mosquitto as part of our build infrastructure. See:
Opening this issue here in the hopes that you might consider not modifying signal dispositions in the mosquitto library.
The text was updated successfully, but these errors were encountered: