-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
CURLOPT_NOSIGNAL does not work everywhere #3138
Comments
I have a small patch that seems to work for us: --- lib/easy.c 2018-10-15 10:43:12.715335746 +0200
+++ lib/easy.c 2018-10-15 10:43:22.039433726 +0200
@@ -761,6 +761,8 @@
/* Copy the MAXCONNECTS option to the multi handle */
curl_multi_setopt(multi, CURLMOPT_MAXCONNECTS, data->set.maxconnects);
+ multi->conn_cache.closure_handle->set.no_signal = data->set.no_signal;
+
mcode = curl_multi_add_handle(multi, data);
if(mcode) {
curl_multi_cleanup(multi); I'm not sure though if that is the best place to do this. |
Thanks for the report, I think you're entirely correct and I'll give your suggested a fix a closer look... |
I've just tried this your fix and it works for us. Thanks! |
Excellent, thanks for confirming! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I did this
I use the curl_easy interfaces in 2 threads, and immediately call
curl_easy_setopt(curl, CURLOPT_NOSIGNAL);
. Eventually, incurl_easy_cleanup
the instances are destroyed, where unfortunatelysigaction(SIGPIPE, &action, NULL);
is called and in our case due to race condition this keeps the SIG_IGN installed if both destructions happen at almost the same time.Here is the relevant stacktrace:
I expected the following
sigaction()
should never be called when we usecurl_easy_setopt(curl, CURLOPT_NOSIGNAL);
curl/libcurl version
curl-7.61.1
operating system
Solaris, Linux
The text was updated successfully, but these errors were encountered: