Expand description
The Unix fcntl function is effectively lots of different functions hidden
behind a single dynamic dispatch interface. In order to provide a type-safe
API, rustix makes them all separate functions so that they can have
dedicated static type signatures.
fcntl functions which are not specific to files or directories live in
the io module instead.
Re-exports§
pub use backend::io::types::FdFlags;
Functions§
- fcntl_
dupfd_ cloexec fcntl(fd, F_DUPFD_CLOEXEC)—Creates a newOwnedFdinstance, with value at leastmin, that hasO_CLOEXECset and that shares the same underlying file description asfd.- fcntl_
getfd fcntl(fd, F_GETFD)—Returns a file descriptor’s flags.- fcntl_
setfd fcntl(fd, F_SETFD, flags)—Sets a file descriptor’s flags.