summaryrefslogtreecommitdiffstats
path: root/cower/set_curlopt_nosignal.patch
blob: 76d7456f24e215256bbf29039df335f5c322f093 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
commit 9d7537ef064a23ed57551aa04283c398fc8d07f1
Author: Dave Reisner <d@falconindy.com>
Date:   Thu Dec 30 20:14:36 2010 -0500

    set CURLOPT_NOSIGNAL on all curl handles
    
    As per curl_easy_setopt(3), this is particularly crucial of multi
    threaded apps (hey that's us) which use timeouts to avoid sending them
    signals and behaving badly (e.g. causing segfaults).

diff --git a/cower.c b/cower.c
index 7ba747c..23ff9bc 100644
--- a/cower.c
+++ b/cower.c
@@ -585,6 +585,7 @@ CURL *curl_create_easy_handle() {
 
   curl_easy_setopt(handle, CURLOPT_USERAGENT, COWER_USERAGENT);
   curl_easy_setopt(handle, CURLOPT_CONNECTTIMEOUT, 10L);
+  curl_easy_setopt(handle, CURLOPT_NOSIGNAL, 1L);
   curl_easy_setopt(handle, CURLOPT_ENCODING, "deflate, gzip");
 
   return(handle);