[][src]Function nix::unistd::pipe2

pub fn pipe2(flags: OFlag) -> Result<(RawFd, RawFd)>
Deprecated since 0.10.0:

pipe2(2) is not actually atomic on these platforms. Use pipe(2) and fcntl(2) instead

Like pipe, but allows setting certain file descriptor flags.

The following flags are supported, and will be set after the pipe is created:

O_CLOEXEC: Set the close-on-exec flag for the new file descriptors. O_NONBLOCK: Set the non-blocking flag for the ends of the pipe.