nix::unistd

Function close

Source
pub fn close<Fd: IntoRawFd>(fd: Fd) -> Result<()>
Expand description

Close a file descriptor.

If fd is an owned file descriptor, it is generally preferred to call drop(fd) rather than close(fd).