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(fd, F_DUPFD_CLOEXEC)
—Creates a newOwnedFd
instance, with value at leastmin
, that hasO_CLOEXEC
set and that shares the same underlying file description asfd
.fcntl(fd, F_GETFD)
—Returns a file descriptor’s flags.fcntl(fd, F_SETFD, flags)
—Sets a file descriptor’s flags.