summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2014-03-06 14:34:27 +0100
committerKonstantin Käfer <mail@kkaefer.com>2014-03-11 12:10:46 +0100
commit67fc1634045049041d0830c4381096cdd1641a7c (patch)
tree6800b1d36fd8b05f246937a4d0e2a7bb2b41257a /linux
parent420cb58a5d423d3c964f51340872eec53061e8da (diff)
downloadqtlocation-mapboxgl-67fc1634045049041d0830c4381096cdd1641a7c.tar.gz
avoid libcurl crashes
Diffstat (limited to 'linux')
-rw-r--r--linux/request.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/linux/request.cpp b/linux/request.cpp
index 0c5eb4ac16..651dcd2d15 100644
--- a/linux/request.cpp
+++ b/linux/request.cpp
@@ -78,6 +78,11 @@ void Request::request(void *ptr) {
CURL *curl = nullptr;
if ((curl = pthread_getspecific(key)) == nullptr) {
curl = curl_easy_init();
+
+ // stopgap to avoid libcurl crashes:
+ // see https://stackoverflow.com/q/9191668
+ curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1);
+
pthread_setspecific(key, curl);
}