mirror of
https://github.com/curl/curl.git
synced 2026-08-26 14:43:32 +03:00
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:
parent
909887f310
commit
2cf209d3f7
2 changed files with 19 additions and 10 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue