Function pipe
pub unsafe fn pipe(pipefd: &mut [i32; 2]) -> Result<(), i32> ⓘ
Available on crate feature
dep_nc
only.Expand description
Create a pipe.
§Examples
let mut fds = [-1_i32, 2];
let ret = unsafe { nc::pipe(&mut fds) };
assert!(ret.is_ok());
let ret = unsafe { nc::close(fds[0]) };
assert!(ret.is_ok());
let ret = unsafe { nc::close(fds[1]) };
assert!(ret.is_ok());