fcntl(2) System Calls Manual fcntl(2) fcntl - (libc -lc) #include int fcntl(int fd, int op, ...); fcntl() fd. op. . fcntl() op EINVAL . F_DUPFD(2const) F_DUPFD_CLOEXEC(2const) F_GETFD(2const) F_SETFD(2const) F_GETFL(2const) F_SETFL(2const) F_SETLK(2const) F_SETLKW(2const) F_GETLK(2const) ( POSIX) F_OFD_SETLK(2const) F_OFD_SETLKW(2const) F_OFD_GETLK(2const) F_GETOWN(2const) F_SETOWN(2const) F_GETOWN_EX(2const) F_SETOWN_EX(2const) F_GETSIG(2const) F_SETSIG(2const) F_SETLEASE(2const) F_GETLEASE(2const) F_SETDELEG(2const) F_GETDELEG(2const) (dnotify) F_NOTIFY(2const) F_SETPIPE_SZ(2const) F_GETPIPE_SZ(2const) F_ADD_SEALS(2const) F_GET_SEALS(2const) / F_GET_RW_HINT(2const) F_SET_RW_HINT(2const) F_GET_FILE_RW_HINT(2const) F_SET_FILE_RW_HINT(2const) . -1 errno . EACCES EAGAIN . EAGAIN . EBADF fd EINVAL op . POSIX.1-2024 FD_CLOFORK F_DUPFD_CLOFORK . POSIX.1-2024. 4.3BSD SVr4 POSIX.1-1988. dup2(2), flock(2), open(2), socket(2), lockf(3), capabilities(7), feature_test_macros(7), lslocks(8) 3 . . : . 6.18 8 2026 fcntl(2)