1CURLOPT_NOSIGNAL(3)        curl_easy_setopt options        CURLOPT_NOSIGNAL(3)
2
3
4

NAME

6       CURLOPT_NOSIGNAL - skip all signal handling
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode curl_easy_setopt(CURL *handle, CURLOPT_NOSIGNAL, long onoff);
12

DESCRIPTION

14       If  onoff  is 1, libcurl will not use any functions that install signal
15       handlers or any functions that cause signals to be sent to the process.
16       This  option is here to allow multi-threaded unix applications to still
17       set/use all timeout options etc, without risking getting signals.
18
19       If this option is set and libcurl has been built with the standard name
20       resolver,  timeouts  will not occur while the name resolve takes place.
21       Consider building libcurl with the c-ares or threaded resolver backends
22       to  enable  asynchronous  DNS  lookups, to enable timeouts for name re‐
23       solves without the use of signals.
24
25       Setting CURLOPT_NOSIGNAL(3) to 1 makes libcurl NOT ask  the  system  to
26       ignore  SIGPIPE  signals,  which  otherwise are sent by the system when
27       trying to send data to a socket which  is  closed  in  the  other  end.
28       libcurl  makes  an  effort to never cause such SIGPIPEs to trigger, but
29       some operating systems have no way to avoid them and even on those that
30       have  there  are some corner cases when they may still happen, contrary
31       to our desire. In addition, using CURLAUTH_NTLM_WB authentication could
32       cause a SIGCHLD signal to be raised.
33

DEFAULT

35       0
36

PROTOCOLS

38       All
39

EXAMPLE

41       CURL *curl = curl_easy_init();
42       if(curl) {
43         curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
44
45         curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1L);
46
47         ret = curl_easy_perform(curl);
48
49         curl_easy_cleanup(curl);
50       }
51

AVAILABILITY

53       Added in 7.10
54

RETURN VALUE

56       Returns  CURLE_OK  if the option is supported, and CURLE_UNKNOWN_OPTION
57       if not.
58

SEE ALSO

60       CURLOPT_TIMEOUT(3),
61
62
63
64libcurl 7.82.0                 November 26, 2021           CURLOPT_NOSIGNAL(3)
Impressum