about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-02-22T12·13+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-02-22T14·51+0100
commitd361901bfe50f43ed1b94e89c95718b072f07821 (patch)
tree0cb5d31a7f7485a7b2bd30db7487439e27b6f94d
parent037ff4e70a70ab8240b984c322093750765a5c55 (diff)
curl: Set CURLOPT_NOSIGNAL
Otherwise using curl is not safe in multi-threaded applications
because it installs a SIGALRM handler.
-rw-r--r--src/libstore/download.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libstore/download.cc b/src/libstore/download.cc
index 01ce1ea2fd4c..e754e82fb27f 100644
--- a/src/libstore/download.cc
+++ b/src/libstore/download.cc
@@ -114,6 +114,8 @@ struct Curl
         curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, progressCallback_);
         curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, (void *) &curl);
         curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0);
+
+        curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1);
     }
 
     ~Curl()