SO_NOSIGPIPE and MSG_NOSIGNAL (rebased #36426)#36824
Conversation
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @brson (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
|
ping @alexcrichton just in case :) |
|
@bors: r+ |
|
📌 Commit 5980d5b has been approved by |
| use sys::net::netc::IPV6_DROP_MEMBERSHIP; | ||
|
|
||
| #[cfg(target_os = "linux")] | ||
| use libc::MSG_NOSIGNAL; |
There was a problem hiding this comment.
- DragonFlyBSD/NetBSD/OpenBSD/Bitrig:
MSG_NOSIGNAL = 0x400; - FreeBSD
MSG_NOSIGNAL = 0x20000; - Android
MSG_NOSIGNAL = 0x4000; - Haiku
MSG_NOSIGNAL = 0x0800;
Would be nice if those were included as well.
| // SO_NOSIGPIPE as a setsockopt flag to disable SIGPIPE emission on socket. | ||
| // Other platforms do otherwise. | ||
| #[cfg(target_vendor = "apple")] | ||
| use libc::SO_NOSIGPIPE; |
There was a problem hiding this comment.
I think Android is covered by target_os="linux", and the value is correct.
I don't have easy access to the other OS listed here. I can offer a "blind" untested patch, but I'm not really in a position to test the behaviour.
There was a problem hiding this comment.
Android is covered by target_os="linux",
To the best of my knowledge its not true, because value of target_os on Android is android, not linux.
Blind is good enough; better than feature disparity IMO.
define more MSG_NOSIGNAL follow-up on rust-lang/rust#36824
use MSG_NOSIGNAL on all relevant platforms followup #36824
I'm not sure what happened when I pushed a rebased branch on #36426 , github closed it...