Open file description
An open file description is a system-wide open-file object referenced by one or more file descriptors and holding state such as the current file offset and file status flags.
On Linux, each successful open creates a new open file description; dup and descriptors inherited through fork refer to the existing object. In the generic writeback-error path, that object's f_wb_err cursor is shared by its aliases. This source-code relationship explains why two descriptor numbers need not provide independent error observations.
Relations
- related
- fsync, writeback-error, errseq-t
Limitations
- File descriptor flags, such as close-on-exec, are not shared state of the open file description.
- Sharing an offset or error cursor does not establish persistence or application-level recovery.