In addition to open protection, a number of other subroutines offer protection by providing an execution environment, which is identical to the environment under which these programs were developed. If an application uses the write family of subroutines and the write request crosses the 2 gigabyte boundary, the write subroutines will transfer data only up to 2 gigabytes minus 1. The behavior of mmap , ftruncate , and fclear are similar. The read family of subroutines also participates in the open protection scheme. If an application attempts to read a file across the 2 gigabyte threshold, only the data up to 2 gigabytes minus 1 will be read.
Open protection is implemented by a flag associated with an open file description.
Since open file descriptions are inherited across the exec family of subroutines, application programs that pass file descriptors that are enabled for large-file access to other programs should consider whether the receiving program can safely access the large file. Application programmers must decide which approach best suits their needs. The second approach is to recode the application to call the large-file enabled subroutines explicitly. It has the disadvantage of creating some ambiguity in the code since the size of the various data items is not obvious from looking at the code. Recoding the application has the obvious disadvantages of requiring more effort and reducing application portability.