2
0

CURLOPT_NOSIGNAL.3 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. .\" **************************************************************************
  2. .\" * _ _ ____ _
  3. .\" * Project ___| | | | _ \| |
  4. .\" * / __| | | | |_) | |
  5. .\" * | (__| |_| | _ <| |___
  6. .\" * \___|\___/|_| \_\_____|
  7. .\" *
  8. .\" * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  9. .\" *
  10. .\" * This software is licensed as described in the file COPYING, which
  11. .\" * you should have received as part of this distribution. The terms
  12. .\" * are also available at https://curl.se/docs/copyright.html.
  13. .\" *
  14. .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  15. .\" * copies of the Software, and permit persons to whom the Software is
  16. .\" * furnished to do so, under the terms of the COPYING file.
  17. .\" *
  18. .\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
  19. .\" * KIND, either express or implied.
  20. .\" *
  21. .\" **************************************************************************
  22. .\"
  23. .TH CURLOPT_NOSIGNAL 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
  24. .SH NAME
  25. CURLOPT_NOSIGNAL \- skip all signal handling
  26. .SH SYNOPSIS
  27. .nf
  28. #include <curl/curl.h>
  29. CURLcode curl_easy_setopt(CURL *handle, CURLOPT_NOSIGNAL, long onoff);
  30. .fi
  31. .SH DESCRIPTION
  32. If \fIonoff\fP is 1, libcurl will not use any functions that install signal
  33. handlers or any functions that cause signals to be sent to the process. This
  34. option is here to allow multi-threaded unix applications to still set/use all
  35. timeout options etc, without risking getting signals.
  36. If this option is set and libcurl has been built with the standard name
  37. resolver, timeouts will not occur while the name resolve takes place.
  38. Consider building libcurl with the c-ares or threaded resolver backends to
  39. enable asynchronous DNS lookups, to enable timeouts for name resolves without
  40. the use of signals.
  41. Setting \fICURLOPT_NOSIGNAL(3)\fP to 1 makes libcurl NOT ask the system to
  42. ignore SIGPIPE signals, which otherwise are sent by the system when trying to
  43. send data to a socket which is closed in the other end. libcurl makes an
  44. effort to never cause such SIGPIPEs to trigger, but some operating systems
  45. have no way to avoid them and even on those that have there are some corner
  46. cases when they may still happen, contrary to our desire. In addition, using
  47. \fICURLAUTH_NTLM_WB\fP authentication could cause a SIGCHLD signal to be
  48. raised.
  49. .SH DEFAULT
  50. 0
  51. .SH PROTOCOLS
  52. All
  53. .SH EXAMPLE
  54. .nf
  55. CURL *curl = curl_easy_init();
  56. if(curl) {
  57. curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
  58. curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1L);
  59. ret = curl_easy_perform(curl);
  60. curl_easy_cleanup(curl);
  61. }
  62. .fi
  63. .SH AVAILABILITY
  64. Added in 7.10
  65. .SH RETURN VALUE
  66. Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
  67. .SH SEE ALSO
  68. .BR CURLOPT_TIMEOUT "(3), "