Open System Services System Calls Reference Manual (G06.28+, H06.05+)

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