Module rustix::io::fcntl

source ·
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 new OwnedFd instance, with value at least min, that has O_CLOEXEC set and that shares the same underlying file description as fd.
  • fcntl(fd, F_GETFD)—Returns a file descriptor’s flags.
  • fcntl(fd, F_SETFD, flags)—Sets a file descriptor’s flags.