Skip to content

Complete fcntl.h implementation

Latest spec link: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/fcntl.h.html

structs

  • f_owner_ex
  • flock

constants for cmd argument in fcntl

  • F_DUPFD
  • F_DUPFD_CLOEXEC
  • F_DUPFD_CLOFORK
  • F_GETFD
  • F_SETFD
  • F_GETFL
  • F_SETFL
  • F_GETLK
  • F_SETLK
  • F_SETLKW
  • F_OFD_GETLK
  • F_OFD_SETLK
  • F_OFD_SETLKW
  • F_GETOWN
  • F_GETOWN_EX
  • F_SETOWN
  • F_SETOWN_EX

constants for the descriptor flags for fcntl

  • FD_CLOEXEC
  • FD_CLOFORK

constants for the l_type argument for fcntl

  • F_RDLCK
  • F_UNLCK
  • F_WRLCK

constants for the type member of f_owner_ex

  • F_OWNER_PID
  • F_OWNER_PGRP

constants for oflag value to open and openat

  • O_CLOEXEC
  • O_CLOFORK
  • O_CREAT
  • O_DIRECTORY
  • O_EXCL
  • O_NOCTTY
  • O_NOFOLLOW
  • O_TRUNC
  • O_TTY_INIT

constants for file status flags for open, openat and fcntl

  • O_APPEND
  • O_DSYNC (SIO)
  • O_NONBLOCK
  • O_RSYNC (SIO)
  • O_SYNC

constant for use as mask for file access mode

  • O_ACCMODE

constants for use as file access modes for open, openat and fcntl

  • O_EXEC
  • O_RDONLY
  • O_RDWR
  • O_SEARCH
  • O_WRONLY

constant used as special value in place of file descriptor for *at functions

  • AT_FDCWD

constant used as value for flag for faccessat

  • AT_EACCESS

constant used as value for flag for fstatat, fchmodat, fchownat and utimenstat

  • AT_SYMLINK_NOFOLLOW

constant used as value for flag for linkat

  • AT_SYMLINK_FOLLOW

constant used as value for flag for unlinkat

  • AT_REMOVEDIR

constants use for advice argument for posix_fadvise

  • POSIX_FADV_DONTNEED (ADV)
  • POSIX_FADV_NOREUSE (ADV)
  • POSIX_FADV_NORMAL (ADV)
  • POSIX_FADV_RANDOM (ADV)
  • POSIX_FADV_SEQUENTIAL (ADV)
  • POSIX_FADV_WILLNEED (ADV)

functions

Edited by Mathew John Roberts