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

open(2) OSS System Calls Reference Manual
If the O_NONBLOCK ag is set, the open() 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 open()
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 open() function blocks until the device is
ready or available.
If the O_NONBLOCK ag is set, the open() 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.
Opening Guardian Files
If the le is a Guardian le (that is, if it is in the /G le system):
The le can be opened only if it is:
AFormat1le or a Format 2 le that is smaller than 2 gigabytes, on a physical |
disk volume, and either:
An odd, unstructured Enscribe le. In this case, it is opened as a regular
le with a primary and secondary extent size that is a multiple of 2. If
the extent size is odd, the open fails.
If the unstructured buffer size was not 4096, a successful open makes the
buffer size 4096 (as if the Guardian procedure SETMODE was called for
mode 93 with a parameter value of 4096).
An EDIT le (le code 101). In this case, it is opened as a regular le
for read-only access.
A Telserv or OSSTTY terminal process.
58 Hewlett-Packard Company 527186-007