Open System Services System Calls Reference Manual (G06.28+, H06.05+)
System Functions (n - p) open(2)
this process is running and on the fileset that contains the new directory. See |
"ACL Inheritance" in the acl(5) reference page.
The file type flags are described in DESCRIPTION.
DESCRIPTION
This function can open:
• OSS files up to a size limit of approximately 2 gigabytes
• Guardian Format 1 files up to a size limit of approximately 2 gigabytes
• Guardian Format 2 files up to a size limit of approximately 2 gigabytes
For information about opening larger files, see the open64(2) reference page.
The open() function establishes a connection between the file indicated by the path parameter
and the returned file descriptor. Subsequent I/O function calls, such as read() and write(), use
the opened file descriptor to access that file.
The returned file descriptor is the lowest-numbered file descriptor not currently open for that pro-
cess. A corresponding Guardian environment file number is also assigned.
The file offset, marking the current position within the file, is set to the beginning of the file. The
new file descriptor is set to remain open across the processing of any of the exec or tdm_exec set
of functions. (See the fcntl(2) reference page.)
The file status flags and file access flags are designated by the oflag parameter. The oflag parame-
ter is constructed by a bitwise-inclusive-OR of exactly one of the file access flags (O_RDONLY,
O_WRONLY,orO_RDWR) with one or more of the file status flags.
You cannot use the open() function to create a First-in, First-out (FIFO) special file. Use the
mkfifo() function instead.
File Access Flags
The file access flags are:
O_RDONLY The file is open only for reading.
O_WRONLY The file is open only for writing.
O_RDWR The file is open for reading and writing.
You must specify exactly one of the file access flags.
File Status Flags
The file status flags that specify special open processing are:
O_CREAT Create and open the file. If the file exists, this flag has no effect except as noted
under the O_EXCL flag. If the file does not exist, a regular file is created with
these characteristics:
• If access control lists (ACLs) are supported, ACL entries are added to |
the file ACL as described in "ACL Inheritance" in the acl(5) reference |
page.
• The owner ID of the file is set to the effective user ID of the process.
527186-007 Hewlett-Packard Company 5−5