Function glib::unix_open_pipe [−][src]
pub fn unix_open_pipe(flags: i32) -> Result<(RawFd, RawFd), Error>
Expand description
Similar to the UNIX pipe()
call, but on modern systems like Linux
uses the pipe2()
system call, which atomically creates a pipe with
the configured flags. The only supported flag currently is
FD_CLOEXEC
. If for example you want to configure O_NONBLOCK
, that
must still be done separately with fcntl()
.
This function does not take O_CLOEXEC
, it takes FD_CLOEXEC
as if
for fcntl()
; these are different on Linux/glibc.
fds
Array of two integers
flags
Bitfield of file descriptor flags, as for fcntl()