Skip to content

std: set SO_NOSIGPIPE on socket pairs#158139

Open
joboet wants to merge 1 commit into
rust-lang:mainfrom
joboet:socketpair-nosigpipe
Open

std: set SO_NOSIGPIPE on socket pairs#158139
joboet wants to merge 1 commit into
rust-lang:mainfrom
joboet:socketpair-nosigpipe

Conversation

@joboet

@joboet joboet commented Jun 19, 2026

Copy link
Copy Markdown
Member

std sets SO_NOSIGPIPE for newly created individual sockets on macOS (#36824) and some BSDs (#124470), but omits that flag for socket pairs, which means that SIGPIPE will be generated should one attempt to send data through a disconnected end. This is inconsistent, we should set always set that flag on the platforms that require it.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jun 19, 2026
@rustbot

rustbot commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @ChrisDenton, libs
  • @ChrisDenton, libs expanded to 12 candidates
  • Random selection from Darksonn, Mark-Simulacrum, clarfonthey, jhpratt

@Mark-Simulacrum

Copy link
Copy Markdown
Member

Could we add a test for this of some kind? It seems easy to forget this on a particular platform. Not sure how easy it is to construct that...

r=me

@Mark-Simulacrum Mark-Simulacrum added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants