From a092c5ccc7c613b8149e98f85d0179ba01c73445 Mon Sep 17 00:00:00 2001 From: i509VCB Date: Sun, 6 Mar 2022 02:19:59 -0600 Subject: Add MsgFlag::MSG_NOSIGNAL --- src/sys/socket/mod.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/sys') diff --git a/src/sys/socket/mod.rs b/src/sys/socket/mod.rs index 54327951..9c37e43b 100644 --- a/src/sys/socket/mod.rs +++ b/src/sys/socket/mod.rs @@ -316,6 +316,20 @@ libc_bitflags!{ target_os = "openbsd"))] #[cfg_attr(docsrs, doc(cfg(all())))] MSG_CMSG_CLOEXEC; + /// Requests not to send `SIGPIPE` errors when the other end breaks the connection. + /// (For more details, see [send(2)](https://linux.die.net/man/2/send)). + #[cfg(any(target_os = "android", + target_os = "dragonfly", + target_os = "freebsd", + target_os = "fuchsia", + target_os = "haiku", + target_os = "illumos", + target_os = "linux", + target_os = "netbsd", + target_os = "openbsd", + target_os = "solaris"))] + #[cfg_attr(docsrs, doc(cfg(all())))] + MSG_NOSIGNAL; } } -- cgit v1.2.3