diff options
author | Daniel Stenberg <daniel@haxx.se> | 2021-04-26 09:58:23 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-04-26 09:58:23 +0200 |
commit | 92c70875ad847a5672d6fba72bf7cdd0aed13c32 (patch) | |
tree | 65292f8ddcf73d1a61f08cd827e465efca699c05 | |
parent | f2e1163bc89be3d1675cd0de4d746cc71d28ea43 (diff) | |
download | curl-bagder/easy_send-sigpipe_ignore.tar.gz |
easy: ignore sigpipe in curl_easy_sendbagder/easy_send-sigpipe_ignore
-rw-r--r-- | lib/easy.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/easy.c b/lib/easy.c index 3deb69a9a..8983dbcce 100644 --- a/lib/easy.c +++ b/lib/easy.c @@ -1171,6 +1171,7 @@ CURLcode curl_easy_send(struct Curl_easy *data, const void *buffer, CURLcode result; ssize_t n1; struct connectdata *c = NULL; + SIGPIPE_VARIABLE(pipe_st); if(Curl_is_in_callback(data)) return CURLE_RECURSIVE_API_CALL; @@ -1185,7 +1186,9 @@ CURLcode curl_easy_send(struct Curl_easy *data, const void *buffer, Curl_attach_connnection(data, c); *n = 0; + sigpipe_ignore(data, &pipe_st); result = Curl_write(data, sfd, buffer, buflen, &n1); + sigpipe_restore(&pipe_st); if(n1 == -1) return CURLE_SEND_ERROR; |