From 8996cf96763632246e4c9c2c9d2da1d05d3525ed Mon Sep 17 00:00:00 2001 From: Harm Berntsen Date: Mon, 4 May 2020 14:41:06 +0200 Subject: Document additional OS-specific flags for pipe2 See https://netbsd.gw.com/cgi-bin/man-cgi?pipe2+2+NetBSD-current and http://man7.org/linux/man-pages/man2/pipe.2.html --- src/unistd.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/unistd.rs b/src/unistd.rs index f6efb364..fff103c0 100644 --- a/src/unistd.rs +++ b/src/unistd.rs @@ -1055,7 +1055,9 @@ pub fn pipe() -> Result<(RawFd, RawFd)> { /// The following flags are supported, and will be set atomically as the pipe is /// created: /// -/// `O_CLOEXEC`: Set the close-on-exec flag for the new file descriptors. +/// `O_CLOEXEC`: Set the close-on-exec flag for the new file descriptors. +#[cfg_attr(target_os = "linux", doc = "`O_DIRECT`: Create a pipe that performs I/O in \"packet\" mode. ")] +#[cfg_attr(target_os = "netbsd", doc = "`O_NOSIGPIPE`: Return `EPIPE` instead of raising `SIGPIPE`. ")] /// `O_NONBLOCK`: Set the non-blocking flag for the ends of the pipe. /// /// See also [pipe(2)](http://man7.org/linux/man-pages/man2/pipe.2.html) -- cgit v1.2.3