From: Jeremie Rapin Date: Wed, 23 Jan 2019 14:35:46 +0000 (+0100) Subject: sigpipe: if mbedTLS is used, ignore SIGPIPE X-Git-Tag: curl-7_64_0~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a9d9a3abbec55ad80d615db4cd74218067df2c33;p=thirdparty%2Fcurl.git sigpipe: if mbedTLS is used, ignore SIGPIPE mbedTLS doesn't have a sigpipe management. If a write/read occurs when the remote closes the socket, the signal is raised and kills the application. Use the curl mecanisms fix this behavior. Signed-off-by: Jeremie Rapin Closes #3502 --- diff --git a/lib/sigpipe.h b/lib/sigpipe.h index 800f9d3b4d..3960a139db 100644 --- a/lib/sigpipe.h +++ b/lib/sigpipe.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2013, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -23,7 +23,8 @@ ***************************************************************************/ #include "curl_setup.h" -#if defined(HAVE_SIGNAL_H) && defined(HAVE_SIGACTION) && defined(USE_OPENSSL) +#if defined(HAVE_SIGNAL_H) && defined(HAVE_SIGACTION) && \ + (defined(USE_OPENSSL) || defined(USE_MBEDTLS)) #include struct sigpipe_ignore {