Skip to content

Commit a092c5c

Browse files
committed
Add MsgFlag::MSG_NOSIGNAL
1 parent 9312f1c commit a092c5c

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
5454
(#[1665](https://github.com/nix-rust/nix/pull/1665))
5555
- Implemented `Read` and `Write` for `&PtyMaster`
5656
(#[1664](https://github.com/nix-rust/nix/pull/1664))
57+
- Added `MSG_NOSIGNAL` for Android, Dragonfly, FreeBSD, Fuchsia, Haiku, Illumos, Linux, NetBSD, OpenBSD and Solaris.
58+
(#[1670](https://github.com/nix-rust/nix/pull/1670))
5759

5860
### Changed
5961

src/sys/socket/mod.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,20 @@ libc_bitflags!{
316316
target_os = "openbsd"))]
317317
#[cfg_attr(docsrs, doc(cfg(all())))]
318318
MSG_CMSG_CLOEXEC;
319+
/// Requests not to send `SIGPIPE` errors when the other end breaks the connection.
320+
/// (For more details, see [send(2)](https://linux.die.net/man/2/send)).
321+
#[cfg(any(target_os = "android",
322+
target_os = "dragonfly",
323+
target_os = "freebsd",
324+
target_os = "fuchsia",
325+
target_os = "haiku",
326+
target_os = "illumos",
327+
target_os = "linux",
328+
target_os = "netbsd",
329+
target_os = "openbsd",
330+
target_os = "solaris"))]
331+
#[cfg_attr(docsrs, doc(cfg(all())))]
332+
MSG_NOSIGNAL;
319333
}
320334
}
321335

0 commit comments

Comments
 (0)