Buy commercial curl support from WolfSSL. We help you work
out your issues, debug your libcurl applications, use the API, port to new
platforms, add new features and more. With a team lead by the curl founder
himself.
Re: curl_easy_recv and SIGPIPE
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: Daniel Stenberg via curl-library <curl-library_at_cool.haxx.se>
Date: Tue, 27 Oct 2020 00:30:40 +0100 (CET)
On Mon, 26 Oct 2020, Tomalak Geret'kal via curl-library wrote:
> Based on the `#if defined`s in sigpipe.h, from what I can tell, curl doesn't
> protect anything from SIGPIPE unless OpenSSL or MBEDTLS are in use. I don't
> know whether your intention was to protect against SIGPIPE more broadly or
> not.
We make sure that no writes to the socket allows SIGPIPE by using MSG_NOSIGNAL
or SO_NOSIGPIPE, depending on target system.
> Admittedly my build is using a "non-standard" config-ios.h,
... and I don't know which of those systems, if any, works on iOS. Maybe you
need a third approach there.
> but the result is USE_SECTRANSP which I believe is supported and also
> available for use by Mac builds. Unless I'm missing something, this
> condition would also cause a SIGPIPE
I don't think so, since it uses callbacks to our code for the actual sending
to the socket and we set the socket to not cause sigpipes. At least that's the
intention.
Date: Tue, 27 Oct 2020 00:30:40 +0100 (CET)
On Mon, 26 Oct 2020, Tomalak Geret'kal via curl-library wrote:
> Based on the `#if defined`s in sigpipe.h, from what I can tell, curl doesn't
> protect anything from SIGPIPE unless OpenSSL or MBEDTLS are in use. I don't
> know whether your intention was to protect against SIGPIPE more broadly or
> not.
We make sure that no writes to the socket allows SIGPIPE by using MSG_NOSIGNAL
or SO_NOSIGPIPE, depending on target system.
> Admittedly my build is using a "non-standard" config-ios.h,
... and I don't know which of those systems, if any, works on iOS. Maybe you
need a third approach there.
> but the result is USE_SECTRANSP which I believe is supported and also
> available for use by Mac builds. Unless I'm missing something, this
> condition would also cause a SIGPIPE
I don't think so, since it uses callbacks to our code for the actual sending
to the socket and we set the socket to not cause sigpipes. At least that's the
intention.
-- / daniel.haxx.se | Commercial curl support up to 24x7 is available! | Private help, bug fixes, support, ports, new features | https://www.wolfssl.com/contact/ ------------------------------------------------------------------- Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.htmlReceived on 2020-10-27