Skip to content

Commit 465a8f7

Browse files
bors[bot]hberntsen
andauthored
Merge #1232
1232: Document O_DIRECT flag for pipe2 r=asomers a=hberntsen From the man page linked in the description Co-authored-by: Harm Berntsen <git@harmberntsen.nl>
2 parents 33f4efe + 8996cf9 commit 465a8f7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/unistd.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1055,7 +1055,9 @@ pub fn pipe() -> Result<(RawFd, RawFd)> {
10551055
/// The following flags are supported, and will be set atomically as the pipe is
10561056
/// created:
10571057
///
1058-
/// `O_CLOEXEC`: Set the close-on-exec flag for the new file descriptors.
1058+
/// `O_CLOEXEC`: Set the close-on-exec flag for the new file descriptors.
1059+
#[cfg_attr(target_os = "linux", doc = "`O_DIRECT`: Create a pipe that performs I/O in \"packet\" mode. ")]
1060+
#[cfg_attr(target_os = "netbsd", doc = "`O_NOSIGPIPE`: Return `EPIPE` instead of raising `SIGPIPE`. ")]
10591061
/// `O_NONBLOCK`: Set the non-blocking flag for the ends of the pipe.
10601062
///
10611063
/// See also [pipe(2)](http://man7.org/linux/man-pages/man2/pipe.2.html)

0 commit comments

Comments
 (0)