socketpair: set SO_NOSIGPIPE where possible

Set SO_NOSIGPIPE on socketpair/inet-simulated socketpair
implementations. eventfd and pipe() do not need/want it.

Closes #20397
This commit is contained in:
Stefan Eissing 2026-01-22 11:46:46 +01:00 committed by Daniel Stenberg
parent ef3101d181
commit 2a6ae3684e
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
3 changed files with 35 additions and 9 deletions

View file

@ -73,6 +73,11 @@ CURLcode Curl_socket_open(struct Curl_easy *data,
uint8_t transport,
curl_socket_t *sockfd);
#ifdef USE_SO_NOSIGPIPE
/* Set SO_NOSIGPIPE on socket, return < 0 on error. */
int Curl_sock_nosigpipe(curl_socket_t sockfd);
#endif
int Curl_socket_close(struct Curl_easy *data, struct connectdata *conn,
curl_socket_t sock);