pub fn pipe2(flags: OFlag) -> Result<(OwnedFd, OwnedFd)>Available on crate feature
fs only.Expand description
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)