Slide 20 of 42
Notes:
Supply actual 2nd descriptor with dup2
- If fd2 is open, it is first closed
Fcntl - 4 different functions in 1
- Duplicate
- File descriptor flags - only 1 - FD_CLOEXEC - file is closed across an exec
- File status flags - O_RDONLY, O_WRONLY, O_RDWR, O_APPEND,
O_CREAT, O_TRUNC, O_EXCL, O_NONBLOCK
-set: only O_APPEND and O_NONBLOCK can be changed
- Record or range locking or byte locking
File Sharing
- Duplicating file descriptors - dup & dup2
- File management - fcntl
- - Duplicate an existing file descriptor
- - Get & set file descriptor flags
- - Get & set file status flags
- - Record locking
Top
Programming Posix
Hosted by 3kRanger.com
email 3kRanger
Updated