Function close

fn close<Fd: std::os::fd::IntoRawFd>(fd: Fd) -> Result<()>

Close a file descriptor.

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