devela::_dep::nc::call

Function close

pub unsafe fn close(fd: i32) -> Result<(), i32> 
Available on crate feature dep_nc only.
Expand description

Close a file descriptor.

§Examples

const STDERR_FD: i32 = 2;
let ret = unsafe { nc::close(STDERR_FD) };
assert!(ret.is_ok());