Skip to content

socket: check result of SO_NOSIGPIPE#20370

Closed
icing wants to merge 3 commits intocurl:masterfrom
icing:socket-check-so_nosigpipe
Closed

socket: check result of SO_NOSIGPIPE#20370
icing wants to merge 3 commits intocurl:masterfrom
icing:socket-check-so_nosigpipe

Conversation

@icing
Copy link
Contributor

@icing icing commented Jan 20, 2026

New define USE_SO_NOSIGPIPE in curl_setup.h, for now set whenever SO_NOSIGPIPE is defined. Maybe overridden in the future on systems where this does not work.

With USE_SO_NOSIGPIPE defined, set SO_NOSIGPIPE on all sockets created by libcurl and fail the creation when setsockopt() fails.

Disable special sigaction handling when SO_NOSIGPIPE is used.

Add DEBUG env var CURL_SIGPIPE_DEBUG to disable curl's default SIGPIPE ignore.

New define USE_SO_NOSIGPIPE in curl_setup.h, for now set whenever
SO_NOSIGPIPE is defined. Maybe overridden in the future on systems
where this does not work.

With USE_SO_NOSIGPIPE defined, set SO_NOSIGPIPE on all sockets
created by libcurl and fail the creation when setsockopt() fails.
@icing icing requested a review from bagder January 20, 2026 10:26
Add DEBUG env var `CURL_SIGPIPE_DEBUG` to disable curl's default
SIGPIPE ignore.
@bagder bagder closed this in 3dd7f58 Jan 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants