Function nix::unistd::pipe2
pub fn pipe2(flags: OFlag) -> Result<(RawFd, RawFd)>
The portability is definied by:
#[cfg(any(target_os = "android", target_os = "dragonfly", target_os =
"emscripten", target_os = "freebsd", target_os = "illumos", target_os =
"linux", target_os = "redox", target_os = "netbsd", target_os = "openbsd",
target_os = "solaris"))]
Documentation
Like pipe
, but allows setting certain file descriptor flags.
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_DIRECT
: Create a pipe that performs I/O in “packet” mode.O_NONBLOCK
: Set the non-blocking flag for the ends of the pipe.
See also pipe(2)