Programming and posix - April 2002
April 3, 2002
Solution Symposium
Page 39
hp e3000
programming
and posix
file management - fcntl()
• int fcntl(int *fildes, int cmd, ...);
• Duplicate an existing file descriptor
• Get & set file descriptor flags (FD_CLOEXEC)
• Get & set file status flags (O_NONBLOCK etc)
• Record locking
• sfcntl() must be used for socket descriptors