Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)

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