CURLOPT_NOSIGNAL(3)
okay bestie, welcome to CURLOPT_NOSIGNAL(3) β yes, that's this page, and it lives in the Library Functions Manual. It's giving βskip all signal handlingβ energy, and honestly? Iconic. π
π NAME π
CURLOPT_NOSIGNAL β skip all signal handling.
β¨ SYNOPSIS β¨
#include <curl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_NOSIGNAL, long onoff);
π¦ DESCRIPTION π¦
If onoff is 1, libcurl uses no functions that install signal handlers or any functions that cause signals to be sent to the process. This option is here to allow multi-threaded Unix applications to still set/use all timeout options etc, without risking getting signals. Periodt. π
If this option is set and libcurl has been built with the standard name resolver, timeouts cannot occur while the name resolve takes place. Consider building libcurl with the c-ares or threaded resolver backends to enable asynchronous DNS lookups, to enable timeouts for name resolves without the use of signals. That's the glow-up. β¨
Heads up, bestie: settingCURLOPT_NOSIGNAL(3)to1makes libcurl NOT ask the system to ignoreSIGPIPEsignals, which otherwise are sent by the system when trying to send data to a socket which is closed in the other end. libcurl makes an effort to never cause suchSIGPIPEsignals to trigger, but some operating systems have no way to avoid them and even on those that have there are some corner cases when they may still happen, contrary to our desire. π
πΈ DEFAULT πΈ
0
π PROTOCOLS π
This functionality affects all supported protocols.
π₯ EXAMPLE π₯
int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1L);
result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
π«Ά AVAILABILITY π«Ά
Added in curl 7.10.
π RETURN VALUE π
curl_easy_setopt(3) returns a CURLcode indicating success or error.
CURLE_OK (0) means everything was OK, non-zero means an error occurred, see libcurl-errors(3).
π SEE ALSO π
CURLOPT_TIMEOUT(3)β go peek at this one too.
mwah π this page's source/version is libcurl, its date is 2026-10-12, and the page itself is CURLOPT_NOSIGNAL(3). go off and handle those signals, bestie π§π
π¦ where this page comes from
- fedora 44: libcurl-devel 8.18.0-14.fc44 Β· curl
- fedora 44: libcurl-devel 8.18.0-14.fc44 Β· curl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms