 | | On older UNIX systems such as Version 7 and pre-4.2 versions of BSD UNIX, open only accepted three values for oflag: 0 to open the file for reading, 1 to open it for writing, and 2 to open it for reading and writing. (For backward compatibility, the constants O_RDONLY, O_WRONLY, and O_RDWR are defined as 0, 1, and 2 respectively.) All of the other options described above were not available, and furthermore, open only opened existing files—to create a file, a separate system call, creat, was provided: | |
|