aboutsummaryrefslogtreecommitdiff
path: root/lib/transfer.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2003-12-02 10:12:44 +0000
committerDaniel Stenberg <daniel@haxx.se>2003-12-02 10:12:44 +0000
commit2cf209d3f777d6cfeba9b82a4d26ef47b89e8140 (patch)
tree2b2e6b926a50bcf76245baec26ea9db89b48f30e /lib/transfer.c
parent909887f310ed7785a535e5a0bd7bf894ee9d0791 (diff)
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.
Diffstat (limited to 'lib/transfer.c')
-rw-r--r--lib/transfer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/transfer.c b/lib/transfer.c
index 81a52a590..15c74c951 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -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);