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

open64(2) OSS System Calls Reference Manual
The effect of setting the O_CREAT ag is immediate.
When opening a le with the O_CREAT ag set:
If the named le does not already exist, a regular disk le is created.
If the named le is not a regular le, the O_CREAT ag is ignored.
When opening a FIFO le with the O_RDONLY ag set:
If the O_NONBLOCK ag is not set, the open64() function blocks until another process
opens the le for writing. If the le is already open for writing (even by the calling pro-
cess), the function returns without delay.
If the O_NONBLOCK ag is set, the open64() function returns immediately.
When opening a FIFO le with the O_WRONLY ag set:
If the O_NONBLOCK ag is not set, the open64() function blocks until another process
opens the le for reading. If the le is already open for reading (even by the calling pro-
cess), the function returns without delay.
If the O_NONBLOCK ag is set, the open64() function returns an error if no process
currently has the le open for reading.
The O_RDWR le access ag is supported when opening a FIFO le; the call to the open64()
function nishes immediately, even if the O_NONBLOCK ag is not set.
When opening a character special le that supports nonblocking opens, such as a terminal dev-
ice:
If the O_NONBLOCK ag is not set, the open64() function blocks until the device is
ready or available.
If the O_NONBLOCK ag is set, the open64() function returns without waiting for the
device to be ready or available. Subsequent behavior of the device is device-specic.
When opening a directory, the open fails, and errno is set to [EISDIR], if either of these condi-
tions is true:
The directory is /E or /G (the Guardian le system) or a directory within /G.
The directory is not /E or /G and is not within /E or /G, and the le access ag is either
O_WRONLY or O_RDWR.
File Type Flags
The le type ags that can be logically ORed into the value specied in the mode parameter are:
S_IFREG Regular le in the OSS le system or in /G, the Guardian le system.
S_ISVTX Sticky bit; used only for directories (cannot be used for les in /G, the Guardian
le system).
S_NONSTOP S_NONSTOP is an alias for O_SYNC.
518 Hewlett-Packard Company 527186-007