If HAVE_MSG_NOSIGNAL is set, we use MSG_NOSIGNAL when we call send() and
recv() and we no longer attempt to ignore the SIGPIPE signal.
This commit is contained in:
@@ -1457,7 +1457,7 @@ CURLcode Curl_pretransfer(struct SessionHandle *data)
|
||||
* different ports! */
|
||||
data->state.allow_port = TRUE;
|
||||
|
||||
#if defined(HAVE_SIGNAL) && defined(SIGPIPE)
|
||||
#if defined(HAVE_SIGNAL) && defined(SIGPIPE) && !defined(HAVE_MSG_NOSIGNAL)
|
||||
/*************************************************************
|
||||
* Tell signal handler to ignore SIGPIPE
|
||||
*************************************************************/
|
||||
@@ -1473,7 +1473,7 @@ CURLcode Curl_pretransfer(struct SessionHandle *data)
|
||||
|
||||
CURLcode Curl_posttransfer(struct SessionHandle *data)
|
||||
{
|
||||
#if defined(HAVE_SIGNAL) && defined(SIGPIPE)
|
||||
#if defined(HAVE_SIGNAL) && defined(SIGPIPE) && !defined(HAVE_MSG_NOSIGNAL)
|
||||
/* restore the signal handler for SIGPIPE before we get back */
|
||||
if(!data->set.no_signal)
|
||||
signal(SIGPIPE, data->state.prev_signal);
|
||||
|
||||
Reference in New Issue
Block a user